summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-01 18:21:29 +0100
committerErik Johnston <erik@matrix.org>2014-09-01 18:21:29 +0100
commit3faa2ae78c7ce2330ed7699ffe3fd08306055da9 (patch)
treee97b09a70586b58cdc9f2533dae1d071167b4b71 /synapse/handlers/message.py
parentAdd beginnings of ban support. (diff)
parentFollow API renaming. state -> presence. mtime_ago -> last_active_ago (diff)
downloadsynapse-3faa2ae78c7ce2330ed7699ffe3fd08306055da9.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into room_config
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index c8ff34e5f5..4c74ce3eff 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -76,6 +76,10 @@ class MessageHandler(BaseRoomHandler):
         Raises:
             SynapseError if something went wrong.
         """
+        # TODO(paul): Why does 'event' not have a 'user' object?
+        user = self.hs.parse_userid(event.user_id)
+        assert(user.is_mine)
+
         if stamp_event:
             event.content["hsob_ts"] = int(self.clock.time_msec())
 
@@ -86,6 +90,10 @@ class MessageHandler(BaseRoomHandler):
 
         yield self._on_new_room_event(event, snapshot)
 
+        self.hs.get_handlers().presence_handler.bump_presence_active_time(
+            user
+        )
+
     @defer.inlineCallbacks
     def get_messages(self, user_id=None, room_id=None, pagin_config=None,
                      feedback=False):