diff options
author | Joas Schilling <coding@schilljs.com> | 2023-01-04 15:06:47 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-01-04 15:23:17 +0100 |
commit | da768a715de002543d146a0a39c0e9b26337c6f8 (patch) | |
tree | 38b42d27fe46be3b7e74dc975b6640f6e2a0cd75 /lib/Controller/RoomController.php | |
parent | 23351fa0966353c5b47ca7b2cc917555b804ee8d (diff) |
Also check the expiration on all other renderings
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/RoomController.php')
-rw-r--r-- | lib/Controller/RoomController.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index 1799b55fb..c3f1343e2 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -655,6 +655,12 @@ class RoomController extends AEnvironmentAwareController { return []; } + $now = $this->timeFactory->getDateTime(); + $expireDate = $message->getComment()->getExpireDate(); + if ($expireDate instanceof \DateTime && $expireDate < $now) { + return []; + } + return $message->toArray($this->getResponseFormat()); } |