summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-12-19 14:30:57 +0000
committerMark Haines <mark.haines@matrix.org>2014-12-19 14:30:57 +0000
commitf70e622d59e7b97c539ee03ffc02315b4d626b00 (patch)
treeea23a633473f19416fe54faf140fa0e1261b0595 /synapse
parentDon't ratelimit room create events (diff)
downloadsynapse-f70e622d59e7b97c539ee03ffc02315b4d626b00.tar.xz
bump_presence_active_time when sending a message event
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/message.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 01a7183548..854b2c73c6 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -19,6 +19,7 @@ from synapse.api.constants import EventTypes, Membership
 from synapse.api.errors import RoomError
 from synapse.streams.config import PaginationConfig
 from synapse.events.validator import EventValidator
+from synapse.util.logcontext import PreserveLoggingContext
 
 from ._base import BaseHandler
 
@@ -153,6 +154,11 @@ class MessageHandler(BaseHandler):
                 context=context,
             )
 
+        if event.type == EventTypes.Message:
+            presence = self.hs.get_handlers().presence_handler
+            with PreserveLoggingContext():
+                presence.bump_presence_active_time(user)
+
         defer.returnValue(event)
 
     @defer.inlineCallbacks