MOBILE-3320 messages: Fix no error displayed when blocking some users
parent
530ac1a109
commit
51e172cd23
|
@ -237,6 +237,7 @@
|
|||
"addon.messages.blocknoncontacts": "message",
|
||||
"addon.messages.blockuser": "message",
|
||||
"addon.messages.blockuserconfirm": "message",
|
||||
"addon.messages.cantblockuser": "message",
|
||||
"addon.messages.contactableprivacy": "message",
|
||||
"addon.messages.contactableprivacy_coursemember": "message",
|
||||
"addon.messages.contactableprivacy_onlycontacts": "message",
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"blocknoncontacts": "Prevent non-contacts from messaging me",
|
||||
"blockuser": "Block user",
|
||||
"blockuserconfirm": "Are you sure you want to block {{$a}}?",
|
||||
"cantblockuser": "You can't block {{$a}} because they have a role with permission to message all users.",
|
||||
"contactableprivacy": "Accept messages from:",
|
||||
"contactableprivacy_coursemember": "My contacts and anyone in my courses",
|
||||
"contactableprivacy_onlycontacts": "My contacts only",
|
||||
|
|
|
@ -1446,6 +1446,12 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView
|
|||
throw new CoreError('No member selected to be blocked.');
|
||||
}
|
||||
|
||||
if (this.otherMember.canmessageevenifblocked) {
|
||||
CoreDomUtils.showErrorModal(Translate.instant('addon.messages.cantblockuser', { $a: this.otherMember.fullname }));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const template = Translate.instant('addon.messages.blockuserconfirm', { $a: this.otherMember.fullname });
|
||||
const okText = Translate.instant('addon.messages.blockuser');
|
||||
|
||||
|
|
Loading…
Reference in New Issue