diff --git a/app.js b/app.js index 95ab12dda..84e577dee 100644 --- a/app.js +++ b/app.js @@ -307,8 +307,8 @@ function initConference(localTracks, connection) { APP.UI.addListener(UIEvents.MESSAGE_CREATED, function (message) { room.sendTextMessage(message); }); - room.on(ConferenceEvents.MESSAGE_RECEIVED, function (userId, text) { - APP.UI.addMessage(userId, getDisplayName(userId), text, Date.now()); + room.on(ConferenceEvents.MESSAGE_RECEIVED, function (id, text, ts) { + APP.UI.addMessage(id, getDisplayName(id), text, ts); }); } diff --git a/lib-jitsi-meet.js b/lib-jitsi-meet.js index 415ce2224..ccd575b05 100644 --- a/lib-jitsi-meet.js +++ b/lib-jitsi-meet.js @@ -501,6 +501,11 @@ function setupListeners(conference) { conference.eventEmitter.emit(JitsiConferenceEvents.SETUP_FAILED); }); + conference.room.addListener(XMPPEvents.MESSAGE_RECEIVED, function (jid, displayName, txt, myJid, ts) { + var id = Strophe.getResourceFromJid(jid); + conference.eventEmitter.emit(JitsiConferenceEvents.MESSAGE_RECEIVED, id, txt, ts); + }); + conference.rtc.addListener(RTCEvents.DOMINANTSPEAKER_CHANGED, function (id) { if(conference.lastActiveSpeaker !== id && conference.room) { conference.lastActiveSpeaker = id;