mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
check if conversation is readonly on frontend
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
parent
4a5e43c495
commit
e6883f4f5f
3 changed files with 2 additions and 6 deletions
|
|
@ -156,10 +156,6 @@ 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() !== ChatManager::VERB_SYSTEM &&
|
||||
$this->getMessageType() !== ChatManager::VERB_COMMAND &&
|
||||
$this->getMessageType() !== ChatManager::VERB_MESSAGE_DELETED &&
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ describe('MessageButtonsBar.vue', () => {
|
|||
})
|
||||
|
||||
const replyButton = findNcButton(wrapper, 'Reply')
|
||||
expect(replyButton.isVisible()).toBe(false)
|
||||
expect(replyButton.exists()).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
<EmoticonOutline :size="20" />
|
||||
</template>
|
||||
</NcButton>
|
||||
<NcButton v-show="isReplyable"
|
||||
<NcButton v-if="isReplyable && !isConversationReadOnly"
|
||||
type="tertiary"
|
||||
:aria-label="t('spreed', 'Reply')"
|
||||
:title="t('spreed', 'Reply')"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue