External matrix user is unable to DM appservice user #57

Closed
opened 2022-05-26 22:46:00 +00:00 by thrrgilag · 4 comments
thrrgilag commented 2022-05-26 22:46:00 +00:00 (Migrated from gitlab.com)

When an external matrix user (someone from a different homeserver) sends a DM request to the appservice user, it fails to accept the invite and join the room. The following exception is caught on the appservice side.

ERROR:appservice:- on_direct_invite -
Traceback (most recent call last):
  File ".../appservice.py", line 585, in on_direct_invite
    matrix_api.join_room(event['room_id'])
  File ".../env/lib/python3.10/site-packages/matrix_client/api.py", line 195, in join_room
    return self._send("POST", path) 
  File ".../env/lib/python3.10/site-packages/matrix_client/api.py", line 690, in _send
    raise MatrixRequestError(                                         
matrix_client.errors.MatrixRequestError: 404: {"errcode":"M_NOT_FOUND","error":"Profile was not found"}
When an external matrix user (someone from a different homeserver) sends a DM request to the appservice user, it fails to accept the invite and join the room. The following exception is caught on the appservice side. ``` ERROR:appservice:- on_direct_invite - Traceback (most recent call last): File ".../appservice.py", line 585, in on_direct_invite matrix_api.join_room(event['room_id']) File ".../env/lib/python3.10/site-packages/matrix_client/api.py", line 195, in join_room return self._send("POST", path) File ".../env/lib/python3.10/site-packages/matrix_client/api.py", line 690, in _send raise MatrixRequestError( matrix_client.errors.MatrixRequestError: 404: {"errcode":"M_NOT_FOUND","error":"Profile was not found"} ```
thrrgilag commented 2022-05-26 22:47:47 +00:00 (Migrated from gitlab.com)

changed title from External matrix user is unable to DM appservice {-bot-} to External matrix user is unable to DM appservice {+user+}

changed title from **External matrix user is unable to DM appservice {-bot-}** to **External matrix user is unable to DM appservice {+user+}**
thrrgilag commented 2022-05-26 22:47:47 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
thrrgilag commented 2022-05-27 00:12:52 +00:00 (Migrated from gitlab.com)

This appears to be issue https://github.com/matrix-org/synapse/issues/2807

The work around provided in https://github.com/matrix-org/matrix-appservice-irc/issues/1270#issuecomment-849765090 does the trick and gets the app service accepting invites.

This appears to be issue https://github.com/matrix-org/synapse/issues/2807 The work around provided in https://github.com/matrix-org/matrix-appservice-irc/issues/1270#issuecomment-849765090 does the trick and gets the app service accepting invites.
thrrgilag commented 2022-05-27 00:33:23 +00:00 (Migrated from gitlab.com)

Related to this, if a DM is started with a user that the appservice hasn't yet registered, an invite/join results in this error:

matrix_client.errors.MatrixRequestError: 403: {"errcode":"M_FORBIDDEN","error":"Application service has not registered this user (@pnut_nuttybot:pnut-matrix.dreamfall.space)"}
Related to this, if a DM is started with a user that the appservice hasn't yet registered, an invite/join results in this error: ``` matrix_client.errors.MatrixRequestError: 403: {"errcode":"M_FORBIDDEN","error":"Application service has not registered this user (@pnut_nuttybot:pnut-matrix.dreamfall.space)"} ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: spacenerdmo/pnut-matrix#57
No description provided.