summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-08 15:16:16 +0000
committerErik Johnston <erik@matrix.org>2016-02-08 15:16:16 +0000
commit2bb5f035affda14742ab715033570616621c0000 (patch)
tree9348a7051ebb1d264afa47b2ce2d87c8b19f5523 /synapse/handlers/room.py
parentMerge pull request #562 from matrix-org/erikj/push_metric (diff)
parentFix up logcontexts (diff)
downloadsynapse-2bb5f035affda14742ab715033570616621c0000.tar.xz
Merge pull request #564 from matrix-org/erikj/logcontext
Fix up logcontexts
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index bfd7e44e9f..a8e3a9029c 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -25,6 +25,7 @@ from synapse.api.constants import (
 from synapse.api.errors import AuthError, StoreError, SynapseError, Codes
 from synapse.util import stringutils, unwrapFirstError
 from synapse.util.async import run_on_reactor
+from synapse.util.logcontext import preserve_context_over_fn
 
 from signedjson.sign import verify_signed_json
 from signedjson.key import decode_verify_key_bytes
@@ -46,11 +47,17 @@ def collect_presencelike_data(distributor, user, content):
 
 
 def user_left_room(distributor, user, room_id):
-    return distributor.fire("user_left_room", user=user, room_id=room_id)
+    return preserve_context_over_fn(
+        distributor.fire,
+        "user_left_room", user=user, room_id=room_id
+    )
 
 
 def user_joined_room(distributor, user, room_id):
-    return distributor.fire("user_joined_room", user=user, room_id=room_id)
+    return preserve_context_over_fn(
+        distributor.fire,
+        "user_joined_room", user=user, room_id=room_id
+    )
 
 
 class RoomCreationHandler(BaseHandler):