diff options
author | Emmanuel ROHEE <erohee@amdocs.com> | 2014-08-27 14:31:20 +0200 |
---|---|---|
committer | Emmanuel ROHEE <erohee@amdocs.com> | 2014-08-27 15:55:51 +0200 |
commit | b1352f97acfd0a588eebd105b4ce757b97baef53 (patch) | |
tree | f6b1c99da815530ab53e1845a1202ae71853b230 /webclient/home/home-controller.js | |
parent | Rename go() into goToPage() which is available from everywhere thanks to the ... (diff) | |
download | synapse-b1352f97acfd0a588eebd105b4ce757b97baef53.tar.xz |
home/recents: show the last message of each message
Diffstat (limited to 'webclient/home/home-controller.js')
-rw-r--r-- | webclient/home/home-controller.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/webclient/home/home-controller.js b/webclient/home/home-controller.js index 3be7fca909..f0c2ccea2f 100644 --- a/webclient/home/home-controller.js +++ b/webclient/home/home-controller.js @@ -86,7 +86,9 @@ angular.module('HomeController', ['matrixService', 'mFileInput', 'mFileUpload', $scope.rooms[data[i].room_id] = data[i]; // Create a shortcut for the last message of this room - $scope.rooms[data[i].room_id].lastMsg = data[i].messages.chunk[0]; + if (data[i].messages && data[i].messages.chunk && data[i].messages.chunk[0]) { + $scope.rooms[data[i].room_id].lastMsg = data[i].messages.chunk[0]; + } } var presence = response.data.presence; |