Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Application Service user cannot join rooms on other homeservers without account on origin homeserver #4778

Closed
paulbdavis opened this issue Mar 1, 2019 · 2 comments · Fixed by #13131
Assignees
Labels
A-Application-Service Related to AS support S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@paulbdavis
Copy link

Description

Trying to join a room as an application service's main user is inconsistent. After setting up the registration, but without explicitly creating the main user for the service, the main user for the application service can only join rooms on another home server if another user from that home server is present.

Steps to reproduce

  • Register new application service that attempts to join any room it is invited to. Do not explicitly register the matrix ID for the main application service user
  • Create a room on another homeserver and invite the application service main user. This fails with a 404 error { "errcode": "M_NOT_FOUND", "error": "Profile was not found" }
  • Disinvite the application service user and invite another user belonging to the same homeserver as the application service
  • Re-invite the application service user. The application service user should be able to join (polling may be required as the invite itself may not have synced)
  • Explicitly create user for the application service's main user
  • Create new room on another homeserver and invite the application service user, it should now be able to join properly

I am not sure if this behavior is intentional, but if so it should be documented in the guide for setting up application services. If not it should be consistent one way or the other.

Version information

  • Homeserver: matrix.org and my personal homeserver
  • Platform: Ubuntu 18.04 on DigitalOcean
@MadLittleMods MadLittleMods added the A-Application-Service Related to AS support label Jul 8, 2021
@erikjohnston erikjohnston added S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Jul 23, 2021
@MadLittleMods
Copy link
Contributor

MadLittleMods commented Jun 29, 2022

There doesn't seem to be a good workaround for this.

I am running into this in some tests. To try to get around this, when trying to explicitly register the application service sender_localpart, I get 400 Bad Request: {"errcode":"M_EXCLUSIVE","error":"This user ID is reserved by an application service."} and I can't easily remove the application service registration file, register the AS user, put the AS registration back, restart Synapse, every time I start up the tests.

@MadLittleMods MadLittleMods self-assigned this Jun 29, 2022
@MadLittleMods
Copy link
Contributor

Ahh, thinking harder, you can set the profile of the application service user via PUT /_matrix/client/v3/profile/{userId}/displayname and PUT /_matrix/client/v3/profile/{userId}/avatar_url to get around this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Application-Service Related to AS support S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
3 participants