buffer: Handle the case where a user left the room in the timeline.
This commit is contained in:
parent
7a12f047f7
commit
5990704c0d
1 changed files with 6 additions and 1 deletions
|
@ -698,7 +698,12 @@ class RoomBuffer(object):
|
||||||
|
|
||||||
def handle_membership_events(self, event, is_state):
|
def handle_membership_events(self, event, is_state):
|
||||||
def join(event, date, is_state):
|
def join(event, date, is_state):
|
||||||
user = self.room.users[event.sender]
|
try:
|
||||||
|
user = self.room.users[event.sender]
|
||||||
|
except KeyError:
|
||||||
|
# No user found, he must have left already in an event that is
|
||||||
|
# yet to come, so do nothing
|
||||||
|
return
|
||||||
|
|
||||||
short_name = shorten_sender(user.user_id)
|
short_name = shorten_sender(user.user_id)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue