1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-03 18:04:08 +02:00

fix chat listing

This commit is contained in:
Robin Appelman 2017-08-08 13:08:09 +02:00
commit 06379c2363
3 changed files with 40 additions and 4 deletions

View file

@ -4,7 +4,7 @@ declare(strict_types=1);
namespace Demostf\API\Demo;
class ChatMessage {
class ChatMessage implements \JsonSerializable {
/** @var string */
private $user;
@ -47,4 +47,12 @@ class ChatMessage {
public function getMessage(): string {
return $this->message;
}
public function jsonSerialize() {
return [
'user' => $this->user,
'time' => $this->time,
'message' => $this->message,
];
}
}