Get rid of the data argument from the MatrixMessage constructor.

This commit is contained in:
poljar (Damir Jelić) 2018-02-08 14:53:23 +01:00
parent ef99a13806
commit 1a804a4dc3
2 changed files with 3 additions and 3 deletions

View file

@ -223,7 +223,6 @@ class MatrixMessage:
options, # type: PluginOptions
message_type, # type: MessageType
room_id=None, # type: str
data={}, # type: Dict[str, Any]
**kwargs
):
# type: (...) -> None
@ -298,7 +297,8 @@ class MatrixMessage:
self.request = server.client.room_leave(room_id)
elif message_type == MessageType.INVITE:
self.request = server.client.room_invite(room_id, data)
assert self.user_id
self.request = server.client.room_invite(room_id, self.user_id)
class MatrixUser:

View file

@ -261,7 +261,7 @@ def matrix_command_invite_cb(data, buffer, command):
OPTIONS,
MessageType.INVITE,
room_id=room_id,
data=invitee
user_id=invitee
)
server.send_or_queue(message)