summary refs log tree commit diff
diff options
context:
space:
mode:
authorTravis Ralston <travpc@gmail.com>2018-11-21 13:21:21 -0700
committerBrendan Abolivier <babolivier@matrix.org>2019-02-13 15:16:04 +0000
commitb26d8cea66ab010c93523d4648f01627a3d89d70 (patch)
treea3bf812733b06dcdac16c573b79d38c2b6584d16
parentProof of concept for auto-accepting invites (diff)
downloadsynapse-b26d8cea66ab010c93523d4648f01627a3d89d70.tar.xz
Preserve log contexts in the room_member_handler
-rw-r--r--synapse/handlers/room_member.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index 219ed78c33..18342fb675 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -30,6 +30,7 @@ import synapse.types
 from synapse.api.constants import EventTypes, Membership
 from synapse.api.errors import AuthError, Codes, SynapseError
 from synapse.types import RoomID, UserID, RoomAlias
+from synapse.util import logcontext
 from synapse.util.async_helpers import Linearizer
 from synapse.util.distributor import user_joined_room, user_left_room
 
@@ -416,7 +417,10 @@ class RoomMemberHandler(object):
                 ret = yield self._remote_join(
                     requester, remote_room_hosts, room_id, target, content
                 )
-                self._send_merged_user_invites(requester, room_id)
+                logcontext.run_in_background(
+                    self._send_merged_user_invites,
+                    requester, room_id,
+                )
                 defer.returnValue(ret)
 
         elif effective_membership_state == Membership.LEAVE:
@@ -451,7 +455,10 @@ class RoomMemberHandler(object):
             prev_events_and_hashes=prev_events_and_hashes,
             content=content,
         )
-        self._send_merged_user_invites(requester, room_id)
+        logcontext.run_in_background(
+            self._send_merged_user_invites,
+            requester, room_id,
+        )
         defer.returnValue(res)
 
     @defer.inlineCallbacks