diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-03-12 12:55:48 +0300 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-03-12 12:55:48 +0300 |
commit | 480d798648f6eff6d45de6753fe09a516bee1923 (patch) | |
tree | 0107361559f5d9f288da078b3d101d99939d27e5 /lib/Model | |
parent | 827d2ac253c377a030b06f0a4f74538e7f950933 (diff) |
Disallow reply action on locked conversations
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/Message.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Model/Message.php b/lib/Model/Message.php index 49ed61e98..30f1fa6d9 100644 --- a/lib/Model/Message.php +++ b/lib/Model/Message.php @@ -156,6 +156,10 @@ class Message { * Specifies whether a message can be replied to */ public function isReplyable(): bool { + if ($this->getRoom()->getReadOnly() === Room::READ_ONLY) { + return false; + } + return $this->getMessageType() !== 'system' && $this->getMessageType() !== 'command' && $this->getMessageType() !== 'comment_deleted' && |