diff options
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r-- | synapse/storage/roommember.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index 89c87290cf..1f8984b6e8 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -35,13 +35,14 @@ class RoomMemberStore(SQLBaseStore): def _store_room_member(self, event): """Store a room member in the database. """ - domain = self.hs.parse_userid(event.target_user_id).domain + target_user_id = event.state_key + domain = self.hs.parse_userid(target_user_id).domain yield self._simple_insert( "room_memberships", { "event_id": event.event_id, - "user_id": event.target_user_id, + "user_id": target_user_id, "sender": event.user_id, "room_id": event.room_id, "membership": event.membership, |