diff --git a/matrix/api.py b/matrix/api.py index 832f7ec..f698188 100644 --- a/matrix/api.py +++ b/matrix/api.py @@ -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: diff --git a/matrix/commands.py b/matrix/commands.py index 4cebb41..cd3d268 100644 --- a/matrix/commands.py +++ b/matrix/commands.py @@ -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)