fix: invite uses payload not params, logger err
This commit is contained in:
parent
1bc88cc48f
commit
296c4b423c
1 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ class AppService:
|
||||||
for doc in body["events"]:
|
for doc in body["events"]:
|
||||||
event = Event(**doc)
|
event = Event(**doc)
|
||||||
if event.type not in EventType.all(): # TODO: python 3.12 makes the .all() unnecessary
|
if event.type not in EventType.all(): # TODO: python 3.12 makes the .all() unnecessary
|
||||||
self.logger.warn("unhandled event of type %s, ignoring", event["type"])
|
self.logger.warn("unhandled event of type %s, ignoring", event.type)
|
||||||
continue
|
continue
|
||||||
self.logger.debug("dispatching event %s", event)
|
self.logger.debug("dispatching event %s", event)
|
||||||
callback = self._callbacks.get(event.type, {}).get(event.room_id, None)
|
callback = self._callbacks.get(event.type, {}).get(event.room_id, None)
|
||||||
|
@ -156,7 +156,7 @@ class AppService:
|
||||||
method="POST",
|
method="POST",
|
||||||
url=f"{self.client_api}/rooms/{room}/invite",
|
url=f"{self.client_api}/rooms/{room}/invite",
|
||||||
headers=self.api_headers,
|
headers=self.api_headers,
|
||||||
params={"user_id": mxid},
|
json={"user_id": mxid},
|
||||||
) as res:
|
) as res:
|
||||||
res.raise_for_status()
|
res.raise_for_status()
|
||||||
self.logger.debug("invited %s to room %s : %s", mxid, room, await res.json())
|
self.logger.debug("invited %s to room %s : %s", mxid, room, await res.json())
|
||||||
|
|
Loading…
Reference in a new issue