Skip to content

Commit

Permalink
Merge pull request #12158 from nextcloud/fix/checkbox-in-one-to-one
Browse files Browse the repository at this point in the history
fix(MessageBody): restrict checkbox editing in one-to-one conversation
  • Loading branch information
nickvergessen authored Apr 19, 2024
2 parents f583ca5 + 08c34c4 commit ac17e26
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,14 @@ export default {
return !this.isConversationReadOnly && this.conversation.participantType !== PARTICIPANT.TYPE.GUEST
},

isOneToOne() {
return this.conversation.type === CONVERSATION.TYPE.ONE_TO_ONE
|| this.conversation.type === CONVERSATION.TYPE.ONE_TO_ONE_FORMER
},

isEditable() {
if (!canEditMessage || !this.isModifiable || this.isObjectShare
|| (!this.$store.getters.isModerator && !this.isMyMsg)) {
|| ((!this.$store.getters.isModerator || this.isOneToOne) && !this.isMyMsg)) {
return false
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,14 @@ export default {
&& this.actorType === this.$store.getters.getActorType()
},

isOneToOne() {
return this.conversation.type === CONVERSATION.TYPE.ONE_TO_ONE
|| this.conversation.type === CONVERSATION.TYPE.ONE_TO_ONE_FORMER
},

isEditable() {
if (!canEditMessage || !this.isModifiable || this.isObjectShare
|| (!this.$store.getters.isModerator && !this.isMyMsg)) {
|| ((!this.$store.getters.isModerator || this.isOneToOne) && !this.isMyMsg)) {
return false
}

Expand Down

0 comments on commit ac17e26

Please sign in to comment.