Skip effect based register in widget mode. (#2230)
Prohibits error message. Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
@@ -21,6 +21,7 @@ import { createClient, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { initClient } from "../matrix-utils";
|
||||
import { Session } from "../ClientContext";
|
||||
import { Config } from "../config/Config";
|
||||
import { widget } from "../widget";
|
||||
|
||||
export const useInteractiveRegistration = (): {
|
||||
privacyPolicyUrl?: string;
|
||||
@@ -48,6 +49,7 @@ export const useInteractiveRegistration = (): {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (widget) return;
|
||||
authClient.current!.registerRequest({}).catch((error) => {
|
||||
setPrivacyPolicyUrl(
|
||||
error.data?.params["m.login.terms"]?.policies?.privacy_policy?.en?.url,
|
||||
|
||||
Reference in New Issue
Block a user