Added roomName, a directive to compute a room name based on its alias (not aliases for now) and its users displaynames or ids

This commit is contained in:
Emmanuel ROHEE 2014-09-01 18:50:39 +02:00
parent 99ce820cc8
commit 7d99cee3ef
4 changed files with 45 additions and 5 deletions

View file

@ -33,8 +33,7 @@ angular.module('RecentsController', ['matrixService', 'eventHandlerService'])
console.log("Invited to room " + event.room_id);
// FIXME push membership to top level key to match /im/sync
event.membership = event.content.membership;
// FIXME bodge a nicer name than the room ID for this invite.
event.room_display_name = event.user_id + "'s room";
$scope.rooms[event.room_id] = event;
}
});
@ -88,7 +87,9 @@ angular.module('RecentsController', ['matrixService', 'eventHandlerService'])
};
$scope.onInit = function() {
refresh();
eventHandlerService.waitForInitialSyncCompletion().then(function() {
refresh();
});
};
}]);

View file

@ -6,7 +6,7 @@
ng-class="{'recentsRoomSelected': (room.room_id === recentsSelectedRoomID)}">
<tr>
<td class="recentsRoomName">
{{ room.room_display_name }}
{{ room.room_id | roomName }}
</td>
<td class="recentsRoomSummaryTS">
{{ (room.lastMsg.ts) | date:'MMM d HH:mm' }}