From 311dc61803f46447f252a04842601fee26e8e5ae Mon Sep 17 00:00:00 2001 From: Emmanuel ROHEE Date: Fri, 12 Sep 2014 10:51:05 +0200 Subject: [PATCH] Handle NAME_EVENT to get room name update event (TODO: recents needs to be directly plugged to $rootScope.events.rooms) --- webclient/recents/recents-controller.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webclient/recents/recents-controller.js b/webclient/recents/recents-controller.js index 8ce096916..b65f97439 100644 --- a/webclient/recents/recents-controller.js +++ b/webclient/recents/recents-controller.js @@ -68,6 +68,11 @@ angular.module('RecentsController', ['matrixService', 'matrixFilter', 'eventHand $rootScope.rooms[event.room_id] = event; } }); + $rootScope.$on(eventHandlerService.NAME_EVENT, function(ngEvent, event, isLive) { + if (isLive) { + $rootScope.rooms[event.room_id].lastMsg = event; + } + }); $rootScope.$on(eventHandlerService.TOPIC_EVENT, function(ngEvent, event, isLive) { if (isLive) { $rootScope.rooms[event.room_id].lastMsg = event;