Revert "[WIP] SDK target improvements"

This commit is contained in:
Timo
2026-02-04 08:51:01 +01:00
committed by GitHub
parent 02b29f98b6
commit 97ee4630b0
12 changed files with 91 additions and 165 deletions

View File

@@ -68,10 +68,7 @@ export let widget: WidgetHelpers | null;
*/
// this needs to be a seperate call and cannot be done on import to allow us to spy on methods in here before
// execution.
export const initializeWidget = (
rtcApplication: string = "m.call",
sendRoomEvents = false,
): void => {
export const initializeWidget = (): void => {
try {
const {
widgetId,
@@ -119,9 +116,6 @@ export const initializeWidget = (
EventType.CallNotify, // Sent as a deprecated fallback
EventType.RTCNotification,
];
if (sendRoomEvents) {
sendEvent.push(EventType.RoomMessage);
}
const sendRecvEvent = [
"org.matrix.rageshake_request",
EventType.CallEncryptionKeysPrefix,
@@ -134,8 +128,8 @@ export const initializeWidget = (
const sendState = [
userId, // Legacy call membership events
`_${userId}_${deviceId}_${rtcApplication}`, // Session membership events
`${userId}_${deviceId}_${rtcApplication}`, // The above with no leading underscore, for room versions whose auth rules allow it
`_${userId}_${deviceId}_m.call`, // Session membership events
`${userId}_${deviceId}_m.call`, // The above with no leading underscore, for room versions whose auth rules allow it
].map((stateKey) => ({
eventType: EventType.GroupCallMemberPrefix,
stateKey,
@@ -148,7 +142,19 @@ export const initializeWidget = (
{ eventType: EventType.GroupCallMemberPrefix },
];
const sendRecvToDevice = [EventType.CallEncryptionKeysPrefix];
const sendRecvToDevice = [
EventType.CallInvite,
EventType.CallCandidates,
EventType.CallAnswer,
EventType.CallHangup,
EventType.CallReject,
EventType.CallSelectAnswer,
EventType.CallNegotiate,
EventType.CallSDPStreamMetadataChanged,
EventType.CallSDPStreamMetadataChangedPrefix,
EventType.CallReplaces,
EventType.CallEncryptionKeysPrefix,
];
const client = createRoomWidgetClient(
api,