summary refs log tree commit diff
path: root/webclient/room
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-08-13 15:53:44 +0100
committerKegan Dougal <kegan@matrix.org>2014-08-13 15:53:44 +0100
commit38c7e923312047b2c26c6ca3f15a9813159088e7 (patch)
tree819149e28fe875a9e8ee1fe22a86f4d64cdd4355 /webclient/room
parentMerge branch 'master' of github.com:matrix-org/synapse (diff)
parentmore quickstart fixes (diff)
downloadsynapse-38c7e923312047b2c26c6ca3f15a9813159088e7.tar.xz
Merge branch 'master' of github.com:matrix-org/synapse
Diffstat (limited to 'webclient/room')
-rw-r--r--webclient/room/room-controller.js11
-rw-r--r--webclient/room/room.html2
2 files changed, 5 insertions, 8 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index cbd5c1a175..5d1c65641e 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -123,17 +123,14 @@ angular.module('RoomController', [])
         var member = $scope.members[chunk.content.user_id];
 
         if ("state" in chunk.content) {
-            var ONLINE = 2;
-            var AWAY = 1;
-            var OFFLINE = 0;
-            if (chunk.content.state === ONLINE) {
+            if (chunk.content.state === "online") {
                 member.presenceState = "online";
             }
-            else if (chunk.content.state === OFFLINE) {
+            else if (chunk.content.state === "offline") {
                 member.presenceState = "offline";
             }
-            else if (chunk.content.state === AWAY) {
-                member.presenceState = "away";
+            else if (chunk.content.state === "unavailable") {
+                member.presenceState = "unavailable";
             }
         }
 
diff --git a/webclient/room/room.html b/webclient/room/room.html
index 9cd1ec3645..5de2190b8b 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -14,7 +14,7 @@
                     <img class="userAvatarGradient" src="img/gradient.png" width="80" height="24"/>
                     <div class="userName">{{ info.displayname || name }}</div>
                 </td>
-                <td class="userPresence" ng-class="info.presenceState === 'online' ? 'online' : (info.presenceState === 'away' ? 'away' : '')" />
+                <td class="userPresence" ng-class="info.presenceState === 'online' ? 'online' : (info.presenceState === 'unavailable' ? 'unavailable' : '')" />
         </table>
     </div>