1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Merge pull request #5171 from matrix-org/travis/widget-api

Switch to using the Widget API SDK for widget messaging
This commit is contained in:
Travis Ralston
2020-10-01 10:16:01 -06:00
committed by GitHub
21 changed files with 560 additions and 1272 deletions

View File

@@ -75,7 +75,8 @@ import {base32} from "rfc4648";
import QuestionDialog from "./components/views/dialogs/QuestionDialog";
import ErrorDialog from "./components/views/dialogs/ErrorDialog";
import WidgetStore from "./stores/WidgetStore";
import ActiveWidgetStore from "./stores/ActiveWidgetStore";
import { WidgetMessagingStore } from "./stores/widgets/WidgetMessagingStore";
import { ElementWidgetActions } from "./stores/widgets/ElementWidgetActions";
// until we ts-ify the js-sdk voip code
type Call = any;
@@ -503,10 +504,10 @@ export default class CallHandler {
const jitsiWidgets = roomInfo.widgets.filter(w => WidgetType.JITSI.matches(w.type));
jitsiWidgets.forEach(w => {
const messaging = ActiveWidgetStore.getWidgetMessaging(w.id);
const messaging = WidgetMessagingStore.instance.getMessagingForId(w.id);
if (!messaging) return; // more "should never happen" words
messaging.hangup();
messaging.transport.send(ElementWidgetActions.HangupCall, {});
});
}
}