Skip to content

Commit b070162

Browse files
committed
Add Dendrite support to hacky already joined error check
1 parent 3a34fdc commit b070162

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mautrix/appservice/api/intent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ async def invite_user(
248248
await self.state_store.joined(room_id, user_id)
249249
except MatrixRequestError as e:
250250
# TODO remove this once MSC3848 is released and minimum spec version is bumped
251-
if e.errcode == "M_FORBIDDEN" and "is already in the room" in e.message:
251+
if e.errcode == "M_FORBIDDEN" and (
252+
"already in the room" in e.message or "is already joined to room" in e.message
253+
):
252254
await self.state_store.joined(room_id, user_id)
253255
else:
254256
raise

0 commit comments

Comments
 (0)