summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/event-handler-service.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index 173055a61b..a14e515999 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -148,6 +148,14 @@ angular.module('eventHandlerService', [])
         $rootScope.events.rooms[event.room_id][event.type] = event;
         $rootScope.$broadcast(NAME_EVENT, event, isLiveEvent);
     };
+    
+    var handleRoomTopic = function(event, isLiveEvent) {
+        console.log("handleRoomTopic " + isLiveEvent);
+
+        initRoom(event.room_id);
+
+        $rootScope.events.rooms[event.room_id][event.type] = event;
+    };
 
     var handleCallEvent = function(event, isLiveEvent) {
         $rootScope.$broadcast(CALL_EVENT, event, isLiveEvent);
@@ -204,6 +212,9 @@ angular.module('eventHandlerService', [])
                     case 'm.room.name':
                         handleRoomName(event, isLiveEvent);
                         break;
+                    case 'm.room.topic':
+                        handleRoomTopic(event, isLiveEvent);
+                        break;
                     default:
                         console.log("Unable to handle event type " + event.type);
                         console.log(JSON.stringify(event, undefined, 4));