Browse Source

add subject support

main
ghost 11 months ago
parent
commit
90e781c803
  1. 14
      src/controller/room.php

14
src/controller/room.php

@ -136,6 +136,18 @@ class Room @@ -136,6 +136,18 @@ class Room
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 = [];
foreach ((array) $this->_kevacoin->kevaFilter($namespace) as $record)
@ -161,7 +173,7 @@ class Room @@ -161,7 +173,7 @@ class Room
file_get_contents(
__DIR__ . '/../../logo.ascii'
),
$namespace,
$subject ? $subject : $namespace,
implode(
PHP_EOL,
$posts

Loading…
Cancel
Save