Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Extract default channel/group logic from setUsername

Open rwakida opened this issue 11 years ago • 1 comments

Use case: Automated anonymous user creation (e.g. import a LDAP user) could call the extracted function. Currently when we import a LDAP user, we can't call the setUsername method because it requires a logged in user. So, we have duplicate the logic to add them to "general" etc.

Another option would be to observe username field change and add user to default channel/group. Then the "bot" wouldn't have to add them to default channel/group.

rwakida avatar Aug 13 '15 03:08 rwakida

This is done now. I have created a "setUsername" and also a "joinDefaultChannels" functions. Please check if that's enough.

marceloschmidt avatar Aug 20 '15 21:08 marceloschmidt