server: Fix invite message printing.

This commit is contained in:
poljar (Damir Jelić) 2018-07-05 19:22:29 +02:00
parent 3c4888c1fb
commit e4d83b5cf4

View file

@ -641,7 +641,6 @@ class MatrixServer:
is_state_event is_state_event
): ):
def join(event, date, room, room_buffer, is_state_event): def join(event, date, room, room_buffer, is_state_event):
room.handle_event(event)
user = room.users[event.sender] user = room.users[event.sender]
buffer_user = RoomUser(user.name, event.sender) buffer_user = RoomUser(user.name, event.sender)
# TODO remove this duplication # TODO remove this duplication
@ -657,6 +656,7 @@ class MatrixServer:
not is_state_event not is_state_event
) )
room.handle_event(event)
date = server_ts_to_weechat(event.timestamp) date = server_ts_to_weechat(event.timestamp)
joined = False joined = False
@ -688,7 +688,7 @@ class MatrixServer:
left = True left = True
elif isinstance(event, RoomMemberInvite): elif isinstance(event, RoomMemberInvite):
room_buffer.invite(event.sender, date) room_buffer.invite(event.invited_user, date)
return return
# calculate room display name and set it as the buffer list name # calculate room display name and set it as the buffer list name