diff options
author | Matthew Hodgson <matthew@matrix.org> | 2014-09-06 10:13:38 -0700 |
---|---|---|
committer | Emmanuel ROHEE <manu@Emmanuels-MacBook-Pro.local> | 2014-09-08 11:28:50 +0200 |
commit | ef0304beff82ad985033405e7230a327a91fc796 (patch) | |
tree | eb298c0fa7c2e4301e3ac1340babb0f2f5d9e4b5 /webclient/components | |
parent | Set the room_alias field when we encounter a new one, rather than only from l... (diff) | |
download | synapse-ef0304beff82ad985033405e7230a327a91fc796.tar.xz |
disable broken event dup suppression, and fix echo for /me
Diffstat (limited to 'webclient/components')
-rw-r--r-- | webclient/components/matrix/event-handler-service.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js index cd4f2ccf28..d2bb31053f 100644 --- a/webclient/components/matrix/event-handler-service.js +++ b/webclient/components/matrix/event-handler-service.js @@ -79,7 +79,8 @@ angular.module('eventHandlerService', []) initRoom(event.room_id); if (isLiveEvent) { - if (event.user_id === matrixService.config().user_id) { + if (event.user_id === matrixService.config().user_id && + (event.content.msgtype === "m.text" || event.content.msgtype === "m.emote") ) { // assume we've already echoed it // FIXME: track events by ID and ungrey the right message to show it's been delivered } @@ -162,11 +163,17 @@ angular.module('eventHandlerService', []) NAME_EVENT: NAME_EVENT, handleEvent: function(event, isLiveEvent) { + // FIXME: event duplication suppression is all broken as the code currently expect to handles + // events multiple times to get their side-effects... +/* if (eventMap[event.event_id]) { console.log("discarding duplicate event: " + JSON.stringify(event)); return; } - + else { + eventMap[event.event_id] = 1; + } +*/ if (event.type.indexOf('m.call.') === 0) { handleCallEvent(event, isLiveEvent); } |