Try to fix cleaning up rooms

Not tested at all
This commit is contained in:
Tulir Asokan
2019-12-11 10:01:47 +02:00
parent 3e6e59db29
commit 39927ac6c0
4 changed files with 20 additions and 20 deletions
@@ -149,11 +149,9 @@ class ProvisioningAPI(AuthAPI):
force = request.query.get("force", None)
if force in ("delete", "unbridge"):
delete = force == "delete"
await portal.cleanup_room(portal.main_intent, portal.mxid, puppets_only=not delete,
message=("Portal deleted (moving to another room)"
if delete
else "Room unbridged (portal moving to another "
"room)"))
await portal.cleanup_portal("Portal deleted (moving to another room)" if delete
else "Room unbridged (portal moving to another room)",
puppets_only=not delete)
else:
return self.get_error_response(409, "chat_already_bridged",
"Telegram chat is already bridged to another "