Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/Model
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-03-12 12:55:48 +0300
committerVincent Petry <vincent@nextcloud.com>2021-03-12 12:55:48 +0300
commit480d798648f6eff6d45de6753fe09a516bee1923 (patch)
tree0107361559f5d9f288da078b3d101d99939d27e5 /lib/Model
parent827d2ac253c377a030b06f0a4f74538e7f950933 (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.php4
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' &&