Commit f9898f32 authored by JC Brand's avatar JC Brand

converse-notification: MUC nickname wasn't being shown

parent 1e100a67
......@@ -9,6 +9,7 @@
- sinon 2.1.0
- eslint 3.19.0
- Bugfix. MUC user's nickname wasn't being shown in HTML5 notification messages. [jcbrand]
- #842 Persistent muc room creation not working [jcbrand]
- #849 `TypeError: _converse.i18n.locale_data is undefined` when reconnecting. [jcbrand]
......
......@@ -131,7 +131,8 @@
* message was received.
*/
var title, roster_item,
from_jid = Strophe.getBareJidFromJid(message.getAttribute('from'));
full_from_jid = message.getAttribute('from'),
from_jid = Strophe.getBareJidFromJid(full_from_jid);
if (message.getAttribute('type') === 'headline') {
if (!_.includes(from_jid, '@') || _converse.allow_non_roster_messaging) {
title = __(___("Notification from %1$s"), from_jid);
......@@ -142,7 +143,7 @@
// XXX: workaround for Prosody which doesn't give type "headline"
title = __(___("Notification from %1$s"), from_jid);
} else if (message.getAttribute('type') === 'groupchat') {
title = __(___("%1$s says"), Strophe.getResourceFromJid(from_jid));
title = __(___("%1$s says"), Strophe.getResourceFromJid(full_from_jid));
} else {
if (_.isUndefined(_converse.roster)) {
_converse.log(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment