diff --git a/spec/chatroom.js b/spec/chatroom.js index d5e6db5d9..1d76f121b 100644 --- a/spec/chatroom.js +++ b/spec/chatroom.js @@ -611,7 +611,11 @@ expect(view.$('.chat-area').is(':visible')).toBeFalsy(); expect(view.$('.occupants').is(':visible')).toBeFalsy(); var $chat_body = view.$('.chatroom-body'); - expect($chat_body.html().trim().indexOf('

You have been kicked from this room

The reason given is: "Avaunt, you cullion!"

')).not.toBe(-1); + expect($chat_body.html().trim().indexOf( + '

You have been kicked from this room

'+ + '

This action was done by Fluellen.

'+ + '

The reason given is: "Avaunt, you cullion!".

' + )).not.toBe(-1); })); it("can be saved to, and retrieved from, browserStorage", mock.initConverse(function (converse) { diff --git a/src/converse-muc.js b/src/converse-muc.js index 1f5b847da..807253d59 100755 --- a/src/converse-muc.js +++ b/src/converse-muc.js @@ -1113,8 +1113,11 @@ var that = this; if (notification.disconnected) { this.showDisconnectMessage(notification.disconnection_message); + if (notification.actor) { + this.showDisconnectMessage(__(___('This action was done by %1$s.'), notification.actor)); + } if (notification.reason) { - this.showDisconnectMessage(__('The reason given is: "'+notification.reason+'"'), true); + this.showDisconnectMessage(__(___('The reason given is: "%1$s".'), notification.reason)); } this.model.set('connection_status', Strophe.Status.DISCONNECTED); return;