Show room topic change in the chat history and in the recents

This commit is contained in:
Emmanuel ROHEE 2014-09-11 11:31:24 +02:00
parent 8dcb6f24b5
commit 7e7eb0efc1
4 changed files with 35 additions and 4 deletions

View file

@ -68,6 +68,11 @@ angular.module('RecentsController', ['matrixService', 'matrixFilter', 'eventHand
$rootScope.rooms[event.room_id] = event;
}
});
$rootScope.$on(eventHandlerService.TOPIC_EVENT, function(ngEvent, event, isLive) {
if (isLive) {
$rootScope.rooms[event.room_id].lastMsg = event;
}
});
};
/**

View file

@ -76,6 +76,10 @@
</div>
</div>
<div ng-switch-when="m.room.topic">
{{ room.lastMsg.user_id | mUserDisplayName: room.room_id }} changed the topic to: {{ room.lastMsg.content.topic }}
</div>
<div ng-switch-default>
<div ng-if="room.lastMsg.type.indexOf('m.call.') === 0">
Call