summary refs log tree commit diff
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-10-30 11:22:47 +0000
committerKegan Dougal <kegan@matrix.org>2014-10-30 11:22:47 +0000
commit8e8bbb00f5a0524873b5a76c833c8a9d553c0327 (patch)
tree4a8266ac601166e213a4e4aa9740d10fe5476a09
parentSYWEB-12: Add a 'Room Info' button which displays all state content. (diff)
downloadsynapse-8e8bbb00f5a0524873b5a76c833c8a9d553c0327.tar.xz
SYWEB-12: Store unknown state events so they are displayed in the Room Info dialog.
-rw-r--r--webclient/components/matrix/event-handler-service.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index 3b1354cdef..6f251eec56 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -564,6 +564,13 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
                         handleRedaction(event, isLiveEvent);
                         break;
                     default:
+                        // if it is a state event, then just add it in so it
+                        // displays on the Room Info screen.
+                        if (typeof(event.state_key) === "string") { // incls. 0-len strings
+                            if (event.room_id) {
+                                handleRoomDateEvent(event, isLiveEvent, false);
+                            }
+                        }
                         console.log("Unable to handle event type " + event.type);
                         console.log(JSON.stringify(event, undefined, 4));
                         break;