Get rid of the data argument from the MatrixMessage constructor.
This commit is contained in:
parent
ef99a13806
commit
1a804a4dc3
2 changed files with 3 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue