mirror of
https://github.com/kevachat/geminiapp.git
synced 2025-03-13 05:51:39 +00:00
add subject support
This commit is contained in:
parent
ae1bf94b82
commit
90e781c803
@ -136,6 +136,18 @@ class Room
|
|||||||
|
|
||||||
public function posts(string $namespace): ?string
|
public function posts(string $namespace): ?string
|
||||||
{
|
{
|
||||||
|
// Get subject
|
||||||
|
$subject = null;
|
||||||
|
|
||||||
|
foreach ((array) $this->_kevacoin->kevaListNamespaces() as $record)
|
||||||
|
{
|
||||||
|
if ($record['namespaceId'] == $namespace)
|
||||||
|
{
|
||||||
|
$subject = $record['displayName'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get posts
|
||||||
$posts = [];
|
$posts = [];
|
||||||
|
|
||||||
foreach ((array) $this->_kevacoin->kevaFilter($namespace) as $record)
|
foreach ((array) $this->_kevacoin->kevaFilter($namespace) as $record)
|
||||||
@ -161,7 +173,7 @@ class Room
|
|||||||
file_get_contents(
|
file_get_contents(
|
||||||
__DIR__ . '/../../logo.ascii'
|
__DIR__ . '/../../logo.ascii'
|
||||||
),
|
),
|
||||||
$namespace,
|
$subject ? $subject : $namespace,
|
||||||
implode(
|
implode(
|
||||||
PHP_EOL,
|
PHP_EOL,
|
||||||
$posts
|
$posts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user