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

"auto_join_rooms" seems not working #2725

Closed
ghost opened this issue Dec 2, 2017 · 13 comments
Closed

"auto_join_rooms" seems not working #2725

ghost opened this issue Dec 2, 2017 · 13 comments

Comments

@ghost
Copy link

ghost commented Dec 2, 2017

Description

I want to use auto_join_rooms but is has no effect for new registered users.

Steps to reproduce

  1. I've added Add config option to auto-join new users to rooms #2545 on my Synapse/0.25.1 to my homeserver.yaml, defined in this way:
# Users who register on this homeserver will automatically be joined
# to these rooms
auto_join_rooms:
#    - "#example:example.com"
- "#serverinfo:myserver.ddns.net"
- "#helpdesk:myserver.ddns.net"
  1. After restarting synapse I've added a new user, logged in but didn't see neither #serverinfo:my.ddns.net not #helpdesk:my.ddns.net.

Version information

@turt2live
Copy link
Member

Did you use the built-in script or Riot? It seems to only work if not using the built-in script.

@ghost
Copy link
Author

ghost commented Dec 7, 2017

Thanks for your help @turt2live but could you specify what you mean with "buit-in script"? I've just added the option auto_join_rooms: to my homeserver.yaml.

@turt2live
Copy link
Member

The build in script is register_new_matrix_user - it doesn't work with this option, but registering new accounts in Riot should work.

@ghost
Copy link
Author

ghost commented Dec 11, 2017

Oh I understand. I didn't enable register option via riot on my homeserver because manual says it shouldn't be used without a captcha. Unfortunately the supported captcha uses Google services and if I use Google services for a privacy focused messenger service for me the whole effort maintaining the server makes much less sense.

Anyway: if auto_join_rooms does not work with script registered users is this a bug or a "feature"? ;)

@turt2live
Copy link
Member

Well, there's valid arguments for either in my opinion. To please both sides, an opt-in parameter could be specified so that other registration methods can make use of the parameter (like external authentication systems or automation scripts).

@msbt
Copy link

msbt commented Feb 9, 2018

Hi there!
Having the same issue here: riot frontend, matrix/synapse backend (different server) using LDAP for authorization but registration is also enabled. Neither (existing LDAP users or newly registered ones) are getting in the channel mentioned in auto_join_rooms. Can I set that in the config.json of riot or is that a synapse issue?

Best regards, M

@krombel
Copy link
Contributor

krombel commented Mar 14, 2018

auto_join_rooms is only evaluated when registering via "normal register" here:

for r in self.hs.config.auto_join_rooms:
try:
yield self._join_user_to_room(fake_requester, r)

I could not find another appearance of auto_join_rooms in the code of synapse.
=> It is not implemented that it works for registrations via

Hopefully sb. takes this notes and implements that so it works for all 3 cases

krombel added a commit to krombel/synapse that referenced this issue Mar 14, 2018
Currently the handling of auto_join_rooms only works when a user
registers itself via public register api. Registrations via
registration_shared_secret and ModuleApi do not work

This auto_joins the users in the registration handler which enables
the auto join feature for all 3 registration paths.

This is related to issue matrix-org#2725

Signed-Off-by: Matthias Kesler <krombel@krombel.de>
@richvdh
Copy link
Member

richvdh commented Apr 9, 2018

Any chance somebody could write a sytest for this to make sure it doesn't regress?

@krombel
Copy link
Contributor

krombel commented Apr 30, 2018

@r4dh4l Would you retest with v0.28?
The PR #2996 should fix some issues in this regard so I expect this issue to be resolved

@ghost
Copy link
Author

ghost commented May 28, 2018

Sry for my late reply. Didn't manage to retest with 0.28 but today I noticed it works with 0.30 after registering a new user. But it still does not work for existing users.
If "auto_join_rooms" is intended to work only for new registered users this issue is fixed otherwise not.

@turt2live
Copy link
Member

It is only supposed to work for new users. Although there's an argument to be had for whether an additional parameter should be available to always force joins (or prevent leaving).

@ghost
Copy link
Author

ghost commented May 28, 2018

Forcing users to stay in a room provokes resistance... people don't like the feeling to be forced to be in a room.

Anyway: It would be better if auto_join_rooms would effect all users of a server. It is up to the users to stay or to leave.

@richvdh
Copy link
Member

richvdh commented May 29, 2018

sounds like it's working as designed

@richvdh richvdh closed this as completed May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants