diff --git a/webclient/recents/recents-controller.js b/webclient/recents/recents-controller.js
index d33d41a922..947bd29de3 100644
--- a/webclient/recents/recents-controller.js
+++ b/webclient/recents/recents-controller.js
@@ -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;
}
});
@@ -43,6 +42,11 @@ angular.module('RecentsController', ['matrixService', 'eventHandlerService'])
$scope.rooms[event.room_id].lastMsg = event;
}
});
+ $scope.$on(eventHandlerService.CALL_EVENT, function(ngEvent, event, isLive) {
+ if (isLive) {
+ $scope.rooms[event.room_id].lastMsg = event;
+ }
+ });
};
@@ -83,7 +87,9 @@ angular.module('RecentsController', ['matrixService', 'eventHandlerService'])
};
$scope.onInit = function() {
- refresh();
+ eventHandlerService.waitForInitialSyncCompletion().then(function() {
+ refresh();
+ });
};
}]);
diff --git a/webclient/recents/recents.html b/webclient/recents/recents.html
index 3f025a98d8..db3b0fb32f 100644
--- a/webclient/recents/recents.html
+++ b/webclient/recents/recents.html
@@ -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' }}
@@ -51,7 +51,9 @@
</div>
<div ng-switch-default>
- {{ room.lastMsg }}
+ <div ng-if="room.lastMsg.type.indexOf('m.call.') == 0">
+ Call
+ </div>
</div>
</div>
</td>
|