New user registration via invite link doesn't put the user into the invited channel

Description

When a channel owner generates an invite link and sends it to a user that already has an account, the user is added to the corresponding channel, as intended. However, if the user doesn’t have an account yet, he’s correctly being sent to the registration page. But after registration, the new user is not put into the invited channel. Clicking the invte-link after registering again, will make the user join the channel.

Server Setup Information

  • Version of Rocket.Chat Server: 5.2
  • Operating System: Ubuntu 22.04
  • Deployment Method: snap
  • Number of Running Instances: 1
  • Proxy: nginx