From d92f742205d65341893d3df981f9ffca9c4a4481 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 3 Jun 2020 14:09:45 +0100 Subject: [PATCH] Fix Jitsi wellknown hooks some more Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/widgets/Jitsi.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/widgets/Jitsi.ts b/src/widgets/Jitsi.ts index 858685b86a..a52f8182aa 100644 --- a/src/widgets/Jitsi.ts +++ b/src/widgets/Jitsi.ts @@ -37,11 +37,8 @@ export class Jitsi { public start() { const cli = MatrixClientPeg.get(); cli.on("WellKnown.client", this.update); - const discoveryResponse = cli.getClientWellKnown(); - if (discoveryResponse) { - // if we missed the first WellKnown.client event then call update anyway - this.update(discoveryResponse); - } + // call update initially in case we missed the first WellKnown.client event and for if no well-known present + this.update(cli.getClientWellKnown()); } private update = async (discoveryResponse): Promise => {