use proper message timestamp
This commit is contained in:
parent
4f91ac01fd
commit
e666ed70f7
4
app.js
4
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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue