Converse upstream WIP.
This commit is contained in:
@ -117,7 +117,7 @@ export const livechatSpecificsPlugin = {
|
||||
},
|
||||
overrides: {
|
||||
ChatRoom: {
|
||||
getActionInfoMessage: function (this: any, code: string, nick: string, actor: any): any {
|
||||
getActionInfoMessage: function getActionInfoMessage (this: any, code: string, nick: string, actor: any): any {
|
||||
if (code === '303') {
|
||||
// When there is numerous anonymous users joining at the same time,
|
||||
// they can all change their nicknames at the same time, generating a log of action messages.
|
||||
@ -130,6 +130,12 @@ export const livechatSpecificsPlugin = {
|
||||
}
|
||||
}
|
||||
return this.__super__.getActionInfoMessage(code, nick, actor)
|
||||
},
|
||||
canPostMessages: function canPostMessages (this: any) {
|
||||
// ConverseJS does not handle properly the visitor role in unmoderated rooms.
|
||||
// See https://github.com/conversejs/converse.js/issues/3428 for more info.
|
||||
// FIXME: if #3428 is fixed, remove this override.
|
||||
return this.isEntered() && this.getOwnRole() !== 'visitor'
|
||||
}
|
||||
},
|
||||
ChatRoomMessage: {
|
||||
|
Reference in New Issue
Block a user