Fix registration not logging you into the new account

This commit is contained in:
Robin Townsend
2023-07-14 12:41:21 -04:00
parent 8cee8c8779
commit 3c30a5812b

View File

@@ -80,11 +80,7 @@ export const RegisterPage: FC = () => {
passwordlessUser
);
if (!client || !client.groupCallEventHandler || !setClient) {
return;
}
if (passwordlessUser) {
if (client && client?.groupCallEventHandler && passwordlessUser) {
// Migrate the user's rooms
for (const groupCall of client.groupCallEventHandler.groupCalls.values()) {
const roomId = groupCall.room.roomId;
@@ -107,7 +103,7 @@ export const RegisterPage: FC = () => {
}
}
setClient({ client: newClient, session });
setClient?.({ client: newClient, session });
PosthogAnalytics.instance.eventSignup.cacheSignupEnd(new Date());
};