Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
bump_presence_active_time when sending a message event
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Haines committed Dec 19, 2014
1 parent a999f0d commit f70e622
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
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

Expand Down Expand Up @@ -153,6 +154,11 @@ def create_and_send_event(self, event_dict, ratelimit=True):
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
Expand Down

0 comments on commit f70e622

Please sign in to comment.