diff options
Diffstat (limited to 'includes/external/matrix/node_modules/matrix-js-sdk/lib/embedded.js.map')
-rw-r--r-- | includes/external/matrix/node_modules/matrix-js-sdk/lib/embedded.js.map | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/external/matrix/node_modules/matrix-js-sdk/lib/embedded.js.map b/includes/external/matrix/node_modules/matrix-js-sdk/lib/embedded.js.map new file mode 100644 index 0000000..fa8b390 --- /dev/null +++ b/includes/external/matrix/node_modules/matrix-js-sdk/lib/embedded.js.map @@ -0,0 +1 @@ +{"version":3,"file":"embedded.js","names":["_matrixWidgetApi","require","_event","_event2","_logger","_client","_sync","_slidingSyncSdk","_user","_utils","RoomWidgetClient","MatrixClient","constructor","widgetApi","capabilities","roomId","opts","_capabilities$sendEve","_capabilities$receive","_capabilities$sendSta","_capabilities$receive2","_capabilities$sendEve2","_capabilities$receive3","_capabilities$sendSta2","_capabilities$receive4","_capabilities$sendToD","_capabilities$receive5","_defineProperty2","default","Promise","resolve","once","ev","preventDefault","detail","data","room_id","event","MatrixEvent","syncApi","injectRoomEvents","room","emit","ClientEvent","Event","setSyncState","SyncState","Syncing","logger","info","getId","getType","getStateKey","event_id","eventId","ack","type","sender","content","encrypted","makeEncrypted","EventType","RoomMessageEncrypted","ToDeviceEvent","sendEvent","length","receiveEvent","sendMessage","Array","isArray","receiveMessage","sendState","receiveState","requestCapabilityForRoomTimeline","forEach","eventType","requestCapabilityToSendEvent","requestCapabilityToReceiveEvent","requestCapabilityToSendMessage","msgType","requestCapabilityToReceiveMessage","stateKey","requestCapabilityToSendState","requestCapabilityToReceiveState","sendToDevice","requestCapabilityToSendToDevice","receiveToDevice","requestCapabilityToReceiveToDevice","turnServers","requestCapability","MatrixCapabilities","MSC3846TurnServers","on","WidgetApiToWidgetAction","SendEvent","onEvent","SendToDevice","onToDevice","start","startClient","_this$capabilities$re","_this$capabilities$re2","lifecycle","AbortController","userId","getUserId","store","storeUser","User","slidingSync","SlidingSyncSdk","buildSyncApiOptions","SyncApi","createRoom","storeRoom","widgetApiReady","all","map","rawEvents","readStateEvents","undefined","events","rawEvent","watchTurnServers","stopClient","off","abort","joinRoom","roomIdOrAlias","Error","encryptAndSendEvent","response","sendRoomEvent","getContent","e","updatePendingEventStatus","EventStatus","NOT_SENT","updatePendingEvent","SENT","sendStateEvent","contentMap","recursiveMapToObject","queueToDevice","batch","MapWithDefault","Map","deviceId","payload","getOrCreate","set","encryptAndSendToDevices","userDeviceInfoArr","deviceInfo","checkTurnServers","getSyncState","syncState","state","oldState","Sync","transport","reply","servers","getTurnServers","onClientStopped","return","signal","addEventListener","server","urls","uris","username","credential","password","TurnServers","log","warn","removeEventListener","exports"],"sources":["../src/embedded.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport {\n WidgetApi,\n WidgetApiToWidgetAction,\n MatrixCapabilities,\n IWidgetApiRequest,\n IWidgetApiAcknowledgeResponseData,\n ISendEventToWidgetActionRequest,\n ISendToDeviceToWidgetActionRequest,\n ISendEventFromWidgetResponseData,\n} from \"matrix-widget-api\";\n\nimport { IEvent, IContent, EventStatus } from \"./models/event\";\nimport { ISendEventResponse } from \"./@types/requests\";\nimport { EventType } from \"./@types/event\";\nimport { logger } from \"./logger\";\nimport { MatrixClient, ClientEvent, IMatrixClientCreateOpts, IStartClientOpts, SendToDeviceContentMap } from \"./client\";\nimport { SyncApi, SyncState } from \"./sync\";\nimport { SlidingSyncSdk } from \"./sliding-sync-sdk\";\nimport { MatrixEvent } from \"./models/event\";\nimport { User } from \"./models/user\";\nimport { Room } from \"./models/room\";\nimport { ToDeviceBatch, ToDevicePayload } from \"./models/ToDeviceMessage\";\nimport { DeviceInfo } from \"./crypto/deviceinfo\";\nimport { IOlmDevice } from \"./crypto/algorithms/megolm\";\nimport { MapWithDefault, recursiveMapToObject } from \"./utils\";\n\ninterface IStateEventRequest {\n eventType: string;\n stateKey?: string;\n}\n\nexport interface ICapabilities {\n /**\n * Event types that this client expects to send.\n */\n sendEvent?: string[];\n /**\n * Event types that this client expects to receive.\n */\n receiveEvent?: string[];\n\n /**\n * Message types that this client expects to send, or true for all message\n * types.\n */\n sendMessage?: string[] | true;\n /**\n * Message types that this client expects to receive, or true for all\n * message types.\n */\n receiveMessage?: string[] | true;\n\n /**\n * Types of state events that this client expects to send.\n */\n sendState?: IStateEventRequest[];\n /**\n * Types of state events that this client expects to receive.\n */\n receiveState?: IStateEventRequest[];\n\n /**\n * To-device event types that this client expects to send.\n */\n sendToDevice?: string[];\n /**\n * To-device event types that this client expects to receive.\n */\n receiveToDevice?: string[];\n\n /**\n * Whether this client needs access to TURN servers.\n * @defaultValue false\n */\n turnServers?: boolean;\n}\n\n/**\n * A MatrixClient that routes its requests through the widget API instead of the\n * real CS API.\n * @experimental This class is considered unstable!\n */\nexport class RoomWidgetClient extends MatrixClient {\n private room?: Room;\n private widgetApiReady = new Promise<void>((resolve) => this.widgetApi.once(\"ready\", resolve));\n private lifecycle?: AbortController;\n private syncState: SyncState | null = null;\n\n public constructor(\n private readonly widgetApi: WidgetApi,\n private readonly capabilities: ICapabilities,\n private readonly roomId: string,\n opts: IMatrixClientCreateOpts,\n ) {\n super(opts);\n\n // Request capabilities for the functionality this client needs to support\n if (\n capabilities.sendEvent?.length ||\n capabilities.receiveEvent?.length ||\n capabilities.sendMessage === true ||\n (Array.isArray(capabilities.sendMessage) && capabilities.sendMessage.length) ||\n capabilities.receiveMessage === true ||\n (Array.isArray(capabilities.receiveMessage) && capabilities.receiveMessage.length) ||\n capabilities.sendState?.length ||\n capabilities.receiveState?.length\n ) {\n widgetApi.requestCapabilityForRoomTimeline(roomId);\n }\n capabilities.sendEvent?.forEach((eventType) => widgetApi.requestCapabilityToSendEvent(eventType));\n capabilities.receiveEvent?.forEach((eventType) => widgetApi.requestCapabilityToReceiveEvent(eventType));\n if (capabilities.sendMessage === true) {\n widgetApi.requestCapabilityToSendMessage();\n } else if (Array.isArray(capabilities.sendMessage)) {\n capabilities.sendMessage.forEach((msgType) => widgetApi.requestCapabilityToSendMessage(msgType));\n }\n if (capabilities.receiveMessage === true) {\n widgetApi.requestCapabilityToReceiveMessage();\n } else if (Array.isArray(capabilities.receiveMessage)) {\n capabilities.receiveMessage.forEach((msgType) => widgetApi.requestCapabilityToReceiveMessage(msgType));\n }\n capabilities.sendState?.forEach(({ eventType, stateKey }) =>\n widgetApi.requestCapabilityToSendState(eventType, stateKey),\n );\n capabilities.receiveState?.forEach(({ eventType, stateKey }) =>\n widgetApi.requestCapabilityToReceiveState(eventType, stateKey),\n );\n capabilities.sendToDevice?.forEach((eventType) => widgetApi.requestCapabilityToSendToDevice(eventType));\n capabilities.receiveToDevice?.forEach((eventType) => widgetApi.requestCapabilityToReceiveToDevice(eventType));\n if (capabilities.turnServers) {\n widgetApi.requestCapability(MatrixCapabilities.MSC3846TurnServers);\n }\n\n widgetApi.on(`action:${WidgetApiToWidgetAction.SendEvent}`, this.onEvent);\n widgetApi.on(`action:${WidgetApiToWidgetAction.SendToDevice}`, this.onToDevice);\n\n // Open communication with the host\n widgetApi.start();\n }\n\n public async startClient(opts: IStartClientOpts = {}): Promise<void> {\n this.lifecycle = new AbortController();\n\n // Create our own user object artificially (instead of waiting for sync)\n // so it's always available, even if the user is not in any rooms etc.\n const userId = this.getUserId();\n if (userId) {\n this.store.storeUser(new User(userId));\n }\n\n // Even though we have no access token and cannot sync, the sync class\n // still has some valuable helper methods that we make use of, so we\n // instantiate it anyways\n if (opts.slidingSync) {\n this.syncApi = new SlidingSyncSdk(opts.slidingSync, this, opts, this.buildSyncApiOptions());\n } else {\n this.syncApi = new SyncApi(this, opts, this.buildSyncApiOptions());\n }\n\n this.room = this.syncApi.createRoom(this.roomId);\n this.store.storeRoom(this.room);\n\n await this.widgetApiReady;\n\n // Backfill the requested events\n // We only get the most recent event for every type + state key combo,\n // so it doesn't really matter what order we inject them in\n await Promise.all(\n this.capabilities.receiveState?.map(async ({ eventType, stateKey }) => {\n const rawEvents = await this.widgetApi.readStateEvents(eventType, undefined, stateKey, [this.roomId]);\n const events = rawEvents.map((rawEvent) => new MatrixEvent(rawEvent as Partial<IEvent>));\n\n await this.syncApi!.injectRoomEvents(this.room!, [], events);\n events.forEach((event) => {\n this.emit(ClientEvent.Event, event);\n logger.info(`Backfilled event ${event.getId()} ${event.getType()} ${event.getStateKey()}`);\n });\n }) ?? [],\n );\n this.setSyncState(SyncState.Syncing);\n logger.info(\"Finished backfilling events\");\n\n // Watch for TURN servers, if requested\n if (this.capabilities.turnServers) this.watchTurnServers();\n }\n\n public stopClient(): void {\n this.widgetApi.off(`action:${WidgetApiToWidgetAction.SendEvent}`, this.onEvent);\n this.widgetApi.off(`action:${WidgetApiToWidgetAction.SendToDevice}`, this.onToDevice);\n\n super.stopClient();\n this.lifecycle!.abort(); // Signal to other async tasks that the client has stopped\n }\n\n public async joinRoom(roomIdOrAlias: string): Promise<Room> {\n if (roomIdOrAlias === this.roomId) return this.room!;\n throw new Error(`Unknown room: ${roomIdOrAlias}`);\n }\n\n protected async encryptAndSendEvent(room: Room, event: MatrixEvent): Promise<ISendEventResponse> {\n let response: ISendEventFromWidgetResponseData;\n try {\n response = await this.widgetApi.sendRoomEvent(event.getType(), event.getContent(), room.roomId);\n } catch (e) {\n this.updatePendingEventStatus(room, event, EventStatus.NOT_SENT);\n throw e;\n }\n\n room.updatePendingEvent(event, EventStatus.SENT, response.event_id);\n return { event_id: response.event_id };\n }\n\n public async sendStateEvent(\n roomId: string,\n eventType: string,\n content: any,\n stateKey = \"\",\n ): Promise<ISendEventResponse> {\n return await this.widgetApi.sendStateEvent(eventType, stateKey, content, roomId);\n }\n\n public async sendToDevice(eventType: string, contentMap: SendToDeviceContentMap): Promise<{}> {\n await this.widgetApi.sendToDevice(eventType, false, recursiveMapToObject(contentMap));\n return {};\n }\n\n public async queueToDevice({ eventType, batch }: ToDeviceBatch): Promise<void> {\n // map: user Id → device Id → payload\n const contentMap: MapWithDefault<string, Map<string, ToDevicePayload>> = new MapWithDefault(() => new Map());\n for (const { userId, deviceId, payload } of batch) {\n contentMap.getOrCreate(userId).set(deviceId, payload);\n }\n\n await this.widgetApi.sendToDevice(eventType, false, recursiveMapToObject(contentMap));\n }\n\n public async encryptAndSendToDevices(userDeviceInfoArr: IOlmDevice<DeviceInfo>[], payload: object): Promise<void> {\n // map: user Id → device Id → payload\n const contentMap: MapWithDefault<string, Map<string, object>> = new MapWithDefault(() => new Map());\n for (const {\n userId,\n deviceInfo: { deviceId },\n } of userDeviceInfoArr) {\n contentMap.getOrCreate(userId).set(deviceId, payload);\n }\n\n await this.widgetApi.sendToDevice((payload as { type: string }).type, true, recursiveMapToObject(contentMap));\n }\n\n // Overridden since we get TURN servers automatically over the widget API,\n // and this method would otherwise complain about missing an access token\n public async checkTurnServers(): Promise<boolean> {\n return this.turnServers.length > 0;\n }\n\n // Overridden since we 'sync' manually without the sync API\n public getSyncState(): SyncState | null {\n return this.syncState;\n }\n\n private setSyncState(state: SyncState): void {\n const oldState = this.syncState;\n this.syncState = state;\n this.emit(ClientEvent.Sync, state, oldState);\n }\n\n private async ack(ev: CustomEvent<IWidgetApiRequest>): Promise<void> {\n await this.widgetApi.transport.reply<IWidgetApiAcknowledgeResponseData>(ev.detail, {});\n }\n\n private onEvent = async (ev: CustomEvent<ISendEventToWidgetActionRequest>): Promise<void> => {\n ev.preventDefault();\n\n // Verify the room ID matches, since it's possible for the client to\n // send us events from other rooms if this widget is always on screen\n if (ev.detail.data.room_id === this.roomId) {\n const event = new MatrixEvent(ev.detail.data as Partial<IEvent>);\n await this.syncApi!.injectRoomEvents(this.room!, [], [event]);\n this.emit(ClientEvent.Event, event);\n this.setSyncState(SyncState.Syncing);\n logger.info(`Received event ${event.getId()} ${event.getType()} ${event.getStateKey()}`);\n } else {\n const { event_id: eventId, room_id: roomId } = ev.detail.data;\n logger.info(`Received event ${eventId} for a different room ${roomId}; discarding`);\n }\n\n await this.ack(ev);\n };\n\n private onToDevice = async (ev: CustomEvent<ISendToDeviceToWidgetActionRequest>): Promise<void> => {\n ev.preventDefault();\n\n const event = new MatrixEvent({\n type: ev.detail.data.type,\n sender: ev.detail.data.sender,\n content: ev.detail.data.content as IContent,\n });\n // Mark the event as encrypted if it was, using fake contents and keys since those are unknown to us\n if (ev.detail.data.encrypted) event.makeEncrypted(EventType.RoomMessageEncrypted, {}, \"\", \"\");\n\n this.emit(ClientEvent.ToDeviceEvent, event);\n this.setSyncState(SyncState.Syncing);\n await this.ack(ev);\n };\n\n private async watchTurnServers(): Promise<void> {\n const servers = this.widgetApi.getTurnServers();\n const onClientStopped = (): void => {\n servers.return(undefined);\n };\n this.lifecycle!.signal.addEventListener(\"abort\", onClientStopped);\n\n try {\n for await (const server of servers) {\n this.turnServers = [\n {\n urls: server.uris,\n username: server.username,\n credential: server.password,\n },\n ];\n this.emit(ClientEvent.TurnServers, this.turnServers);\n logger.log(`Received TURN server: ${server.uris}`);\n }\n } catch (e) {\n logger.warn(\"Error watching TURN servers\", e);\n } finally {\n this.lifecycle!.signal.removeEventListener(\"abort\", onClientStopped);\n }\n }\n}\n"],"mappings":";;;;;;;;AAgBA,IAAAA,gBAAA,GAAAC,OAAA;AAWA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAEA,IAAAO,KAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAR,OAAA;AAxCA;AACA;AACA;AACA;AACA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