Dont send register request in widget mode (#2100)

* dont register in widget mode

Signed-off-by: Timo K <toger5@hotmail.de>

* not call registerPasswordlessUser where its called in a widget.

Signed-off-by: Timo K <toger5@hotmail.de>

---------

Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo
2024-02-21 21:07:44 +01:00
committed by GitHub
parent 87df439020
commit 6539c15177
2 changed files with 8 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ import { useOptInAnalytics } from "../settings/useSetting";
import { HomePage } from "../home/HomePage";
import { platform } from "../Platform";
import { AppSelectionModal } from "./AppSelectionModal";
import { widget } from "../widget";
export const RoomPage: FC = () => {
const {
@@ -62,7 +63,7 @@ export const RoomPage: FC = () => {
useEffect(() => {
// If we've finished loading, are not already authed and we've been given a display name as
// a URL param, automatically register a passwordless user
if (!loading && !authenticated && displayName) {
if (!loading && !authenticated && displayName && !widget) {
setIsRegistering(true);
registerPasswordlessUser(displayName).finally(() => {
setIsRegistering(false);