@tagea/capacitor-matrix 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -37
- package/android/src/main/kotlin/de/tremaze/capacitor/matrix/CapMatrix.kt +10 -13
- package/android/src/main/kotlin/de/tremaze/capacitor/matrix/CapMatrixPlugin.kt +18 -2
- package/dist/docs.json +131 -2
- package/dist/esm/definitions.d.ts +40 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +5 -0
- package/dist/esm/web.js +190 -48
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +190 -48
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +190 -48
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/CapMatrixPlugin/CapMatrix.swift +18 -7
- package/ios/Sources/CapMatrixPlugin/CapMatrixPlugin.swift +19 -2
- package/package.json +3 -2
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Matrix = registerPlugin('Matrix', {\n web: () => import('./web').then((m) => new m.MatrixWeb()),\n});\nexport * from './definitions';\nexport { Matrix };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { createClient, ClientEvent, RoomEvent, RoomMemberEvent, Direction, MsgType, EventType, RelationType, UserEvent, } from 'matrix-js-sdk';\nimport { decodeRecoveryKey } from 'matrix-js-sdk/lib/crypto-api/recovery-key';\nimport { deriveRecoveryKeyFromPassphrase } from 'matrix-js-sdk/lib/crypto-api/key-passphrase';\nconst SESSION_KEY = 'matrix_session';\nexport class MatrixWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this._cryptoCallbacks = {\n getSecretStorageKey: async (opts) => {\n var _a;\n const keyId = Object.keys(opts.keys)[0];\n if (!keyId)\n return null;\n // If we have the raw key cached, use it directly\n if (this.secretStorageKey) {\n return [keyId, this.secretStorageKey];\n }\n // If we have a passphrase, derive the key using the server's stored parameters\n if (this.recoveryPassphrase) {\n const keyInfo = opts.keys[keyId];\n if (keyInfo === null || keyInfo === void 0 ? void 0 : keyInfo.passphrase) {\n const derived = await deriveRecoveryKeyFromPassphrase(this.recoveryPassphrase, keyInfo.passphrase.salt, keyInfo.passphrase.iterations, (_a = keyInfo.passphrase.bits) !== null && _a !== void 0 ? _a : 256);\n this.secretStorageKey = derived;\n return [keyId, derived];\n }\n }\n return null;\n },\n cacheSecretStorageKey: (_keyId, _keyInfo, key) => {\n this.secretStorageKey = key;\n },\n };\n }\n // ── Auth ──────────────────────────────────────────────\n async login(options) {\n const tmpClient = createClient({ baseUrl: options.homeserverUrl });\n const res = await tmpClient.loginWithPassword(options.userId, options.password);\n this.client = createClient({\n baseUrl: options.homeserverUrl,\n accessToken: res.access_token,\n userId: res.user_id,\n deviceId: res.device_id,\n cryptoCallbacks: this._cryptoCallbacks,\n });\n const session = {\n accessToken: res.access_token,\n userId: res.user_id,\n deviceId: res.device_id,\n homeserverUrl: options.homeserverUrl,\n };\n this.persistSession(session);\n return session;\n }\n async loginWithToken(options) {\n this.client = createClient({\n baseUrl: options.homeserverUrl,\n accessToken: options.accessToken,\n userId: options.userId,\n deviceId: options.deviceId,\n cryptoCallbacks: this._cryptoCallbacks,\n });\n const session = {\n accessToken: options.accessToken,\n userId: options.userId,\n deviceId: options.deviceId,\n homeserverUrl: options.homeserverUrl,\n };\n this.persistSession(session);\n return session;\n }\n async logout() {\n if (this.client) {\n this.client.stopClient();\n try {\n await this.client.logout(true);\n }\n catch (_a) {\n // ignore logout errors (e.g. token already invalidated)\n }\n this.client = undefined;\n }\n localStorage.removeItem(SESSION_KEY);\n }\n async getSession() {\n const raw = localStorage.getItem(SESSION_KEY);\n if (!raw)\n return null;\n try {\n return JSON.parse(raw);\n }\n catch (_a) {\n return null;\n }\n }\n // ── Sync ──────────────────────────────────────────────\n async startSync() {\n this.requireClient();\n this.client.on(ClientEvent.Sync, (state, _prev, data) => {\n var _a;\n const mapped = this.mapSyncState(state);\n this.notifyListeners('syncStateChange', {\n state: mapped,\n error: (_a = data === null || data === void 0 ? void 0 : data.error) === null || _a === void 0 ? void 0 : _a.message,\n });\n });\n this.client.on(RoomEvent.Timeline, (event, room) => {\n var _a;\n this.notifyListeners('messageReceived', {\n event: this.serializeEvent(event, room === null || room === void 0 ? void 0 : room.roomId),\n });\n // When an encrypted event arrives, listen for decryption and re-notify\n if (event.isBeingDecrypted() || event.getType() === 'm.room.encrypted') {\n event.once('Event.decrypted', () => {\n this.notifyListeners('messageReceived', {\n event: this.serializeEvent(event, room === null || room === void 0 ? void 0 : room.roomId),\n });\n });\n }\n // When a reaction or redaction arrives, re-emit the parent event with updated aggregated reactions\n if (event.getType() === EventType.Reaction || event.getType() === EventType.RoomRedaction) {\n const rel = (_a = event.getContent()) === null || _a === void 0 ? void 0 : _a['m.relates_to'];\n const targetId = (rel === null || rel === void 0 ? void 0 : rel.event_id) || event.getAssociatedId();\n if (targetId && room) {\n const targetEvent = room.findEventById(targetId);\n if (targetEvent) {\n // Small delay to let the SDK finish aggregation\n setTimeout(() => {\n this.notifyListeners('messageReceived', {\n event: this.serializeEvent(targetEvent, room.roomId),\n });\n }, 100);\n }\n }\n }\n });\n this.client.on(RoomEvent.Receipt, (_event, room) => {\n var _a;\n this.notifyListeners('receiptReceived', {\n roomId: room.roomId,\n });\n // Re-emit own sent messages with updated read status\n const myUserId = (_a = this.client) === null || _a === void 0 ? void 0 : _a.getUserId();\n if (myUserId) {\n const timeline = room.getLiveTimeline().getEvents();\n // Walk backwards through recent events; stop after checking a reasonable batch\n const limit = Math.min(timeline.length, 50);\n for (let i = timeline.length - 1; i >= timeline.length - limit; i--) {\n const evt = timeline[i];\n if (evt.getSender() !== myUserId)\n continue;\n const serialized = this.serializeEvent(evt, room.roomId);\n if (serialized.status === 'read') {\n this.notifyListeners('messageReceived', { event: serialized });\n }\n }\n }\n });\n this.client.on(RoomEvent.Name, (room) => {\n this.notifyListeners('roomUpdated', {\n roomId: room.roomId,\n summary: this.serializeRoom(room),\n });\n });\n this.client.on(RoomMemberEvent.Typing, (_event, member) => {\n var _a, _b;\n const roomId = member === null || member === void 0 ? void 0 : member.roomId;\n if (roomId) {\n const room = this.client.getRoom(roomId);\n if (room) {\n const typingEvent = room.currentState.getStateEvents('m.typing', '');\n const userIds = (_b = (_a = typingEvent === null || typingEvent === void 0 ? void 0 : typingEvent.getContent()) === null || _a === void 0 ? void 0 : _a.user_ids) !== null && _b !== void 0 ? _b : [];\n this.notifyListeners('typingChanged', { roomId, userIds });\n }\n }\n });\n this.client.on(UserEvent.Presence, (_event, user) => {\n var _a, _b, _c;\n this.notifyListeners('presenceChanged', {\n userId: user.userId,\n presence: {\n presence: (_a = user.presence) !== null && _a !== void 0 ? _a : 'offline',\n statusMsg: (_b = user.presenceStatusMsg) !== null && _b !== void 0 ? _b : undefined,\n lastActiveAgo: (_c = user.lastActiveAgo) !== null && _c !== void 0 ? _c : undefined,\n },\n });\n });\n await this.client.startClient({ initialSyncLimit: 20 });\n }\n async stopSync() {\n this.requireClient();\n this.client.stopClient();\n }\n async getSyncState() {\n this.requireClient();\n const raw = this.client.getSyncState();\n return { state: this.mapSyncState(raw) };\n }\n // ── Rooms ─────────────────────────────────────────────\n async createRoom(options) {\n var _a;\n this.requireClient();\n const createOpts = {\n visibility: 'private',\n };\n if (options.name)\n createOpts.name = options.name;\n if (options.topic)\n createOpts.topic = options.topic;\n if ((_a = options.invite) === null || _a === void 0 ? void 0 : _a.length)\n createOpts.invite = options.invite;\n if (options.preset)\n createOpts.preset = options.preset;\n if (options.isDirect)\n createOpts.is_direct = true;\n const initialState = [];\n if (options.isEncrypted) {\n initialState.push({\n type: 'm.room.encryption',\n state_key: '',\n content: { algorithm: 'm.megolm.v1.aes-sha2' },\n });\n }\n if (options.historyVisibility) {\n initialState.push({\n type: 'm.room.history_visibility',\n state_key: '',\n content: { history_visibility: options.historyVisibility },\n });\n }\n if (initialState.length > 0) {\n createOpts.initial_state = initialState;\n }\n const res = await this.client.createRoom(createOpts);\n return { roomId: res.room_id };\n }\n async getRooms() {\n this.requireClient();\n const rooms = this.client.getRooms().map((r) => this.serializeRoom(r));\n return { rooms };\n }\n async getRoomMembers(options) {\n this.requireClient();\n const room = this.client.getRoom(options.roomId);\n if (!room)\n throw new Error(`Room ${options.roomId} not found`);\n await room.loadMembersIfNeeded();\n const members = room.getMembers().map((m) => {\n var _a, _b;\n return ({\n userId: m.userId,\n displayName: (_a = m.name) !== null && _a !== void 0 ? _a : undefined,\n membership: m.membership,\n avatarUrl: (_b = m.getMxcAvatarUrl()) !== null && _b !== void 0 ? _b : undefined,\n });\n });\n return { members };\n }\n async joinRoom(options) {\n this.requireClient();\n const room = await this.client.joinRoom(options.roomIdOrAlias);\n return { roomId: room.roomId };\n }\n async leaveRoom(options) {\n this.requireClient();\n await this.client.leave(options.roomId);\n }\n async forgetRoom(options) {\n this.requireClient();\n await this.client.forget(options.roomId);\n }\n // ── Messaging ─────────────────────────────────────────\n async sendMessage(options) {\n var _a, _b, _c;\n this.requireClient();\n const msgtype = (_a = options.msgtype) !== null && _a !== void 0 ? _a : 'm.text';\n const mediaTypes = ['m.image', 'm.audio', 'm.video', 'm.file'];\n if (mediaTypes.includes(msgtype) && options.fileUri) {\n // Media message: upload file then send\n const response = await fetch(options.fileUri);\n const blob = await response.blob();\n const uploadRes = await this.client.uploadContent(blob, {\n name: options.fileName,\n type: options.mimeType,\n });\n const mxcUrl = uploadRes.content_uri;\n const content = {\n msgtype,\n body: options.body || options.fileName || 'file',\n url: mxcUrl,\n info: {\n mimetype: options.mimeType,\n size: (_b = options.fileSize) !== null && _b !== void 0 ? _b : blob.size,\n },\n };\n const res = await this.client.sendMessage(options.roomId, content);\n return { eventId: res.event_id };\n }\n // Text message\n const msgtypeMap = {\n 'm.text': MsgType.Text,\n 'm.notice': MsgType.Notice,\n 'm.emote': MsgType.Emote,\n };\n const mappedType = (_c = msgtypeMap[msgtype]) !== null && _c !== void 0 ? _c : MsgType.Text;\n const res = await this.client.sendMessage(options.roomId, {\n msgtype: mappedType,\n body: options.body,\n });\n return { eventId: res.event_id };\n }\n async editMessage(options) {\n this.requireClient();\n const content = {\n msgtype: MsgType.Text,\n body: `* ${options.newBody}`,\n 'm.new_content': {\n msgtype: MsgType.Text,\n body: options.newBody,\n },\n 'm.relates_to': {\n rel_type: 'm.replace',\n event_id: options.eventId,\n },\n };\n const res = await this.client.sendMessage(options.roomId, content);\n return { eventId: res.event_id };\n }\n async sendReply(options) {\n var _a, _b;\n this.requireClient();\n const msgtype = (_a = options.msgtype) !== null && _a !== void 0 ? _a : 'm.text';\n const mediaTypes = ['m.image', 'm.audio', 'm.video', 'm.file'];\n let content;\n if (mediaTypes.includes(msgtype) && options.fileUri) {\n // Media reply: upload file then send with reply relation\n const response = await fetch(options.fileUri);\n const blob = await response.blob();\n const uploadRes = await this.client.uploadContent(blob, {\n name: options.fileName,\n type: options.mimeType,\n });\n content = {\n msgtype,\n body: options.body || options.fileName || 'file',\n url: uploadRes.content_uri,\n info: {\n mimetype: options.mimeType,\n size: (_b = options.fileSize) !== null && _b !== void 0 ? _b : blob.size,\n },\n 'm.relates_to': {\n 'm.in_reply_to': {\n event_id: options.replyToEventId,\n },\n },\n };\n }\n else {\n // Text reply\n content = {\n msgtype: MsgType.Text,\n body: options.body,\n 'm.relates_to': {\n 'm.in_reply_to': {\n event_id: options.replyToEventId,\n },\n },\n };\n }\n const res = await this.client.sendMessage(options.roomId, content);\n return { eventId: res.event_id };\n }\n async getRoomMessages(options) {\n var _a, _b, _c, _d, _e;\n this.requireClient();\n const limit = (_a = options.limit) !== null && _a !== void 0 ? _a : 20;\n const room = this.client.getRoom(options.roomId);\n // If no explicit pagination token, return events from the synced timeline\n if (!options.from && room) {\n // Paginate backwards so we have enough events (initial sync may be small)\n try {\n await this.client.scrollback(room, limit);\n }\n catch (_f) {\n // scrollback may fail if there's no more history\n }\n const timeline = room.getLiveTimeline();\n const timelineEvents = timeline.getEvents();\n // Filter out reactions and redactions before slicing — they're aggregated into parent events\n const displayableEvents = timelineEvents.filter((e) => {\n const t = e.getType();\n return t !== EventType.Reaction && t !== EventType.RoomRedaction;\n });\n const events = displayableEvents\n .slice(-limit)\n .map((e) => this.serializeEvent(e, options.roomId))\n .sort((a, b) => a.originServerTs - b.originServerTs);\n const backToken = (_b = timeline.getPaginationToken(Direction.Backward)) !== null && _b !== void 0 ? _b : undefined;\n return { events, nextBatch: backToken };\n }\n // Paginate further back using the token\n const fromToken = (_c = options.from) !== null && _c !== void 0 ? _c : null;\n const res = await this.client.createMessagesRequest(options.roomId, fromToken, limit, Direction.Backward);\n const events = ((_d = res.chunk) !== null && _d !== void 0 ? _d : []).map((e) => {\n var _a;\n return ({\n eventId: e.event_id,\n roomId: options.roomId,\n senderId: e.sender,\n type: e.type,\n content: ((_a = e.content) !== null && _a !== void 0 ? _a : {}),\n originServerTs: e.origin_server_ts,\n });\n });\n return { events, nextBatch: (_e = res.end) !== null && _e !== void 0 ? _e : undefined };\n }\n async markRoomAsRead(options) {\n this.requireClient();\n const room = this.client.getRoom(options.roomId);\n if (room) {\n const event = room.findEventById(options.eventId);\n if (event) {\n await this.client.sendReadReceipt(event);\n return;\n }\n }\n // Fallback to HTTP request if event not found locally\n await this.client.setRoomReadMarkersHttpRequest(options.roomId, options.eventId, options.eventId);\n }\n async refreshEventStatuses(options) {\n this.requireClient();\n const room = this.client.getRoom(options.roomId);\n if (!room)\n return { events: [] };\n const events = [];\n for (const eid of options.eventIds) {\n const event = room.findEventById(eid);\n if (event) {\n events.push(this.serializeEvent(event, options.roomId));\n }\n }\n return { events };\n }\n // ── Redactions & Reactions ───────────────────────────────\n async redactEvent(options) {\n this.requireClient();\n await this.client.redactEvent(options.roomId, options.eventId, undefined, {\n reason: options.reason,\n });\n }\n async sendReaction(options) {\n this.requireClient();\n const myUserId = this.client.getUserId();\n // Check if the user already reacted with this key — if so, toggle off (redact)\n const room = this.client.getRoom(options.roomId);\n if (room && myUserId) {\n try {\n const relations = room.relations.getChildEventsForEvent(options.eventId, RelationType.Annotation, EventType.Reaction);\n if (relations) {\n const existing = relations.getRelations().find((e) => { var _a, _b; return e.getSender() === myUserId && ((_b = (_a = e.getContent()) === null || _a === void 0 ? void 0 : _a['m.relates_to']) === null || _b === void 0 ? void 0 : _b.key) === options.key; });\n if (existing) {\n const existingId = existing.getId();\n if (existingId) {\n await this.client.redactEvent(options.roomId, existingId);\n return { eventId: existingId };\n }\n }\n }\n }\n catch (_a) {\n // fall through to send\n }\n }\n const res = await this.client.sendEvent(options.roomId, EventType.Reaction, {\n 'm.relates_to': {\n rel_type: RelationType.Annotation,\n event_id: options.eventId,\n key: options.key,\n },\n });\n return { eventId: res.event_id };\n }\n // ── Room Management ────────────────────────────────────\n async setRoomName(options) {\n this.requireClient();\n await this.client.setRoomName(options.roomId, options.name);\n }\n async setRoomTopic(options) {\n this.requireClient();\n await this.client.setRoomTopic(options.roomId, options.topic);\n }\n async setRoomAvatar(options) {\n this.requireClient();\n await this.client.sendStateEvent(options.roomId, 'm.room.avatar', { url: options.mxcUrl });\n }\n async inviteUser(options) {\n this.requireClient();\n await this.client.invite(options.roomId, options.userId);\n }\n async kickUser(options) {\n this.requireClient();\n await this.client.kick(options.roomId, options.userId, options.reason);\n }\n async banUser(options) {\n this.requireClient();\n await this.client.ban(options.roomId, options.userId, options.reason);\n }\n async unbanUser(options) {\n this.requireClient();\n await this.client.unban(options.roomId, options.userId);\n }\n // ── Typing ─────────────────────────────────────────────\n async sendTyping(options) {\n var _a;\n this.requireClient();\n await this.client.sendTyping(options.roomId, options.isTyping, (_a = options.timeout) !== null && _a !== void 0 ? _a : 30000);\n }\n // ── Media ──────────────────────────────────────────────\n async getMediaUrl(options) {\n this.requireClient();\n // Use the authenticated media endpoint (Matrix v1.11+)\n const mxcPath = options.mxcUrl.replace('mxc://', '');\n const baseUrl = this.client.getHomeserverUrl().replace(/\\/$/, '');\n const accessToken = this.client.getAccessToken();\n const httpUrl = `${baseUrl}/_matrix/client/v1/media/download/${mxcPath}?access_token=${accessToken}`;\n return { httpUrl };\n }\n async getThumbnailUrl(options) {\n var _a;\n this.requireClient();\n const mxcPath = options.mxcUrl.replace('mxc://', '');\n const baseUrl = this.client.getHomeserverUrl().replace(/\\/$/, '');\n const accessToken = this.client.getAccessToken();\n const method = (_a = options.method) !== null && _a !== void 0 ? _a : 'scale';\n const httpUrl = `${baseUrl}/_matrix/client/v1/media/thumbnail/${mxcPath}?width=${options.width}&height=${options.height}&method=${method}&access_token=${accessToken}`;\n return { httpUrl };\n }\n async uploadContent(options) {\n this.requireClient();\n const response = await fetch(options.fileUri);\n const blob = await response.blob();\n const res = await this.client.uploadContent(blob, {\n name: options.fileName,\n type: options.mimeType,\n });\n return { contentUri: res.content_uri };\n }\n // ── Presence ───────────────────────────────────────────\n async setPresence(options) {\n this.requireClient();\n await this.client.setPresence({\n presence: options.presence,\n status_msg: options.statusMsg,\n });\n }\n async getPresence(options) {\n var _a, _b, _c;\n this.requireClient();\n const user = this.client.getUser(options.userId);\n return {\n presence: (_a = user === null || user === void 0 ? void 0 : user.presence) !== null && _a !== void 0 ? _a : 'offline',\n statusMsg: (_b = user === null || user === void 0 ? void 0 : user.presenceStatusMsg) !== null && _b !== void 0 ? _b : undefined,\n lastActiveAgo: (_c = user === null || user === void 0 ? void 0 : user.lastActiveAgo) !== null && _c !== void 0 ? _c : undefined,\n };\n }\n // ── Device Management ──────────────────────────────────\n async getDevices() {\n var _a;\n this.requireClient();\n const res = await this.client.getDevices();\n const devices = ((_a = res.devices) !== null && _a !== void 0 ? _a : []).map((d) => {\n var _a, _b, _c;\n return ({\n deviceId: d.device_id,\n displayName: (_a = d.display_name) !== null && _a !== void 0 ? _a : undefined,\n lastSeenTs: (_b = d.last_seen_ts) !== null && _b !== void 0 ? _b : undefined,\n lastSeenIp: (_c = d.last_seen_ip) !== null && _c !== void 0 ? _c : undefined,\n });\n });\n return { devices };\n }\n async deleteDevice(options) {\n this.requireClient();\n await this.client.deleteDevice(options.deviceId, options.auth);\n }\n // ── Push ──────────────────────────────────────────────\n async setPusher(options) {\n var _a;\n this.requireClient();\n await this.client.setPusher({\n pushkey: options.pushkey,\n kind: (_a = options.kind) !== null && _a !== void 0 ? _a : undefined,\n app_id: options.appId,\n app_display_name: options.appDisplayName,\n device_display_name: options.deviceDisplayName,\n lang: options.lang,\n data: options.data,\n });\n }\n // ── Encryption ──────────────────────────────────────────\n async initializeCrypto() {\n this.requireClient();\n const userId = this.client.getUserId();\n const deviceId = this.client.getDeviceId();\n await this.client.initRustCrypto({\n cryptoDatabasePrefix: `matrix-js-sdk/${userId}/${deviceId}`,\n });\n }\n async getEncryptionStatus() {\n this.requireClient();\n const crypto = this.client.getCrypto();\n if (!crypto) {\n return {\n isCrossSigningReady: false,\n crossSigningStatus: { hasMaster: false, hasSelfSigning: false, hasUserSigning: false, isReady: false },\n isKeyBackupEnabled: false,\n isSecretStorageReady: false,\n };\n }\n const csReady = await crypto.isCrossSigningReady();\n const csStatus = await crypto.getCrossSigningStatus();\n const backupVersion = await crypto.getActiveSessionBackupVersion();\n // Use getSecretStorageStatus().defaultKeyId to check if secret storage was\n // set up at all, rather than isSecretStorageReady() which also checks that\n // cross-signing keys are stored (too strict for Phase 1).\n const ssStatus = await crypto.getSecretStorageStatus();\n const ssHasKey = ssStatus.defaultKeyId !== null;\n return {\n isCrossSigningReady: csReady,\n crossSigningStatus: {\n hasMaster: csStatus.publicKeysOnDevice,\n hasSelfSigning: csStatus.privateKeysCachedLocally.selfSigningKey,\n hasUserSigning: csStatus.privateKeysCachedLocally.userSigningKey,\n isReady: csReady,\n },\n isKeyBackupEnabled: backupVersion !== null,\n keyBackupVersion: backupVersion !== null && backupVersion !== void 0 ? backupVersion : undefined,\n isSecretStorageReady: ssHasKey,\n };\n }\n async bootstrapCrossSigning() {\n const crypto = await this.ensureCrypto();\n await crypto.bootstrapCrossSigning({\n setupNewCrossSigning: true,\n authUploadDeviceSigningKeys: async (makeRequest) => {\n var _a;\n // UIA flow: attempt with dummy auth, fall back to session-based retry\n try {\n await makeRequest({ type: 'm.login.dummy' });\n }\n catch (e) {\n const session = (_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.session;\n if (session) {\n await makeRequest({ type: 'm.login.dummy', session });\n }\n else {\n throw e;\n }\n }\n },\n });\n }\n async setupKeyBackup() {\n const crypto = await this.ensureCrypto();\n await crypto.resetKeyBackup();\n const version = await crypto.getActiveSessionBackupVersion();\n return { exists: true, version: version !== null && version !== void 0 ? version : undefined, enabled: true };\n }\n async getKeyBackupStatus() {\n this.requireClient();\n const crypto = this.requireCrypto();\n const version = await crypto.getActiveSessionBackupVersion();\n return {\n exists: version !== null,\n version: version !== null && version !== void 0 ? version : undefined,\n enabled: version !== null,\n };\n }\n async restoreKeyBackup(_options) {\n var _a;\n this.requireClient();\n const crypto = this.requireCrypto();\n const result = await crypto.restoreKeyBackup();\n return { importedKeys: (_a = result === null || result === void 0 ? void 0 : result.imported) !== null && _a !== void 0 ? _a : 0 };\n }\n async setupRecovery(options) {\n var _a;\n const crypto = await this.ensureCrypto();\n const keyInfo = await crypto.createRecoveryKeyFromPassphrase(options === null || options === void 0 ? void 0 : options.passphrase);\n this.secretStorageKey = keyInfo.privateKey;\n await crypto.bootstrapSecretStorage({\n createSecretStorageKey: async () => keyInfo,\n setupNewSecretStorage: true,\n setupNewKeyBackup: true,\n });\n return { recoveryKey: (_a = keyInfo.encodedPrivateKey) !== null && _a !== void 0 ? _a : '' };\n }\n async isRecoveryEnabled() {\n const crypto = await this.ensureCrypto();\n const ready = await crypto.isSecretStorageReady();\n return { enabled: ready };\n }\n async recoverAndSetup(options) {\n const crypto = await this.ensureCrypto();\n // Derive/decode the secret storage key\n if (options.recoveryKey) {\n this.secretStorageKey = decodeRecoveryKey(options.recoveryKey);\n }\n else if (options.passphrase) {\n // Store passphrase — the getSecretStorageKey callback will derive\n // the key using the server's stored PBKDF2 params (salt, iterations)\n this.recoveryPassphrase = options.passphrase;\n this.secretStorageKey = undefined; // Clear any stale raw key\n }\n else {\n throw new Error('Either recoveryKey or passphrase must be provided');\n }\n // Load the backup decryption key from secret storage into the Rust crypto store.\n // This triggers the getSecretStorageKey callback.\n try {\n await crypto.loadSessionBackupPrivateKeyFromSecretStorage();\n }\n catch (e) {\n // Clear stale key material so the next attempt starts fresh\n this.secretStorageKey = undefined;\n this.recoveryPassphrase = undefined;\n throw e;\n }\n // Now that the key is stored locally, activate backup in the running client\n await crypto.checkKeyBackupAndEnable();\n }\n async resetRecoveryKey(options) {\n return this.setupRecovery(options);\n }\n async exportRoomKeys(options) {\n this.requireClient();\n const crypto = this.requireCrypto();\n const keys = await crypto.exportRoomKeysAsJson();\n // The exported JSON is not encrypted by default; for passphrase encryption\n // the caller should handle it, or we return the raw JSON\n void options.passphrase; // passphrase encryption is handled natively; on web we return raw\n return { data: keys };\n }\n async importRoomKeys(options) {\n this.requireClient();\n const crypto = this.requireCrypto();\n void options.passphrase; // passphrase decryption handled natively; on web we import raw\n await crypto.importRoomKeysAsJson(options.data);\n return { importedKeys: -1 }; // count not available from importRoomKeysAsJson\n }\n // ── Helpers ───────────────────────────────────────────\n requireClient() {\n if (!this.client) {\n throw new Error('Not logged in. Call login() or loginWithToken() first.');\n }\n }\n requireCrypto() {\n const crypto = this.client.getCrypto();\n if (!crypto) {\n throw new Error('Crypto not initialized. Call initializeCrypto() first.');\n }\n return crypto;\n }\n async ensureCrypto() {\n this.requireClient();\n if (!this.client.getCrypto()) {\n await this.initializeCrypto();\n }\n return this.requireCrypto();\n }\n persistSession(session) {\n localStorage.setItem(SESSION_KEY, JSON.stringify(session));\n }\n serializeEvent(event, fallbackRoomId) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n const roomId = (_b = (_a = event.getRoomId()) !== null && _a !== void 0 ? _a : fallbackRoomId) !== null && _b !== void 0 ? _b : '';\n // Redacted events should be marked clearly\n if (event.isRedacted()) {\n return {\n eventId: (_c = event.getId()) !== null && _c !== void 0 ? _c : '',\n roomId,\n senderId: (_d = event.getSender()) !== null && _d !== void 0 ? _d : '',\n type: 'm.room.redaction',\n content: { body: 'Message deleted' },\n originServerTs: event.getTs(),\n };\n }\n const content = Object.assign({}, ((_e = event.getContent()) !== null && _e !== void 0 ? _e : {}));\n // Include aggregated reactions from the room's relations container\n const eventId = event.getId();\n if (eventId && roomId) {\n const room = (_f = this.client) === null || _f === void 0 ? void 0 : _f.getRoom(roomId);\n if (room) {\n try {\n const relations = room.relations.getChildEventsForEvent(eventId, RelationType.Annotation, EventType.Reaction);\n if (relations) {\n const sorted = relations.getSortedAnnotationsByKey();\n if (sorted && sorted.length > 0) {\n content.reactions = sorted.map(([key, events]) => ({\n key,\n count: events.size,\n senders: Array.from(events).map((e) => e.getSender()),\n }));\n }\n }\n }\n catch (_k) {\n // relations may not be available\n }\n }\n }\n // Determine delivery/read status\n let status;\n const readBy = [];\n const myUserId = (_g = this.client) === null || _g === void 0 ? void 0 : _g.getUserId();\n const sender = event.getSender();\n const room = eventId && roomId ? (_h = this.client) === null || _h === void 0 ? void 0 : _h.getRoom(roomId) : undefined;\n if (sender === myUserId && eventId) {\n // Own message — check delivery status\n const evtStatus = event.status; // null = sent & echoed, 'sending', 'sent', etc.\n if (evtStatus === 'sending' || evtStatus === 'encrypting' || evtStatus === 'queued') {\n status = 'sending';\n }\n else {\n // Event is at least sent; check if anyone has read it\n if (room) {\n try {\n const members = room.getJoinedMembers();\n for (const member of members) {\n if (member.userId === myUserId)\n continue;\n if (room.hasUserReadEvent(member.userId, eventId)) {\n readBy.push(member.userId);\n }\n }\n }\n catch (_l) {\n // ignore errors\n }\n }\n status = readBy.length > 0 ? 'read' : 'sent';\n }\n }\n else if (eventId && room) {\n // Other's message — collect who has read it\n try {\n const members = room.getJoinedMembers();\n for (const member of members) {\n if (member.userId === sender)\n continue;\n if (room.hasUserReadEvent(member.userId, eventId)) {\n readBy.push(member.userId);\n }\n }\n }\n catch (_m) {\n // ignore\n }\n }\n // Include unsigned data (e.g. m.relations for edits, transaction_id for local echo)\n const unsignedData = (_j = event.getUnsigned) === null || _j === void 0 ? void 0 : _j.call(event);\n const unsigned = unsignedData && Object.keys(unsignedData).length > 0\n ? unsignedData\n : undefined;\n return {\n eventId: eventId !== null && eventId !== void 0 ? eventId : '',\n roomId,\n senderId: sender !== null && sender !== void 0 ? sender : '',\n type: event.getType(),\n content,\n originServerTs: event.getTs(),\n status,\n readBy: readBy.length > 0 ? readBy : undefined,\n unsigned,\n };\n }\n serializeRoom(room) {\n var _a, _b, _c, _d, _e, _f;\n // Detect DM: check m.direct account data or guess from room state\n let isDirect = false;\n try {\n const directEvent = (_a = this.client) === null || _a === void 0 ? void 0 : _a.getAccountData('m.direct');\n if (directEvent) {\n const directContent = directEvent.getContent();\n for (const roomIds of Object.values(directContent)) {\n if (roomIds.includes(room.roomId)) {\n isDirect = true;\n break;\n }\n }\n }\n }\n catch (_g) {\n // ignore\n }\n // Get avatar URL\n let avatarUrl;\n const avatarEvent = room.currentState.getStateEvents('m.room.avatar', '');\n if (avatarEvent) {\n const mxcUrl = (_b = avatarEvent.getContent()) === null || _b === void 0 ? void 0 : _b.url;\n if (mxcUrl) {\n avatarUrl = mxcUrl;\n }\n }\n return {\n roomId: room.roomId,\n name: room.name,\n topic: (_e = (_d = (_c = room.currentState.getStateEvents('m.room.topic', '')) === null || _c === void 0 ? void 0 : _c.getContent()) === null || _d === void 0 ? void 0 : _d.topic) !== null && _e !== void 0 ? _e : undefined,\n memberCount: room.getJoinedMemberCount(),\n isEncrypted: room.hasEncryptionStateEvent(),\n unreadCount: (_f = room.getUnreadNotificationCount()) !== null && _f !== void 0 ? _f : 0,\n lastEventTs: room.getLastActiveTimestamp() || undefined,\n membership: room.getMyMembership(),\n avatarUrl,\n isDirect,\n };\n }\n async searchUsers(options) {\n var _a;\n this.requireClient();\n const resp = await this.client.searchUserDirectory({\n term: options.searchTerm,\n limit: (_a = options.limit) !== null && _a !== void 0 ? _a : 10,\n });\n return {\n results: resp.results.map((u) => ({\n userId: u.user_id,\n displayName: u.display_name,\n avatarUrl: u.avatar_url,\n })),\n limited: resp.limited,\n };\n }\n mapSyncState(state) {\n switch (state) {\n case 'PREPARED':\n case 'SYNCING':\n case 'CATCHUP':\n case 'RECONNECTING':\n return 'SYNCING';\n case 'ERROR':\n return 'ERROR';\n case 'STOPPED':\n return 'STOPPED';\n default:\n return 'INITIAL';\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","deriveRecoveryKeyFromPassphrase","createClient","ClientEvent","RoomEvent","EventType","RoomMemberEvent","UserEvent","MsgType","Direction","RelationType","decodeRecoveryKey"],"mappings":";;;AACK,UAAC,MAAM,GAAGA,mBAAc,CAAC,QAAQ,EAAE;IACxC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IAC7D,CAAC;;ICCD,MAAM,WAAW,GAAG,gBAAgB;IAC7B,MAAM,SAAS,SAASC,cAAS,CAAC;IACzC,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC;IAC3B,QAAQ,IAAI,CAAC,gBAAgB,GAAG;IAChC,YAAY,mBAAmB,EAAE,OAAO,IAAI,KAAK;IACjD,gBAAgB,IAAI,EAAE;IACtB,gBAAgB,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACvD,gBAAgB,IAAI,CAAC,KAAK;IAC1B,oBAAoB,OAAO,IAAI;IAC/B;IACA,gBAAgB,IAAI,IAAI,CAAC,gBAAgB,EAAE;IAC3C,oBAAoB,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC;IACzD,gBAAgB;IAChB;IACA,gBAAgB,IAAI,IAAI,CAAC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AY,KAAK,cAAc;IAC/B,gBAAgB,OAAO,SAAS;IAChC,YAAY,KAAK,OAAO;IACxB,gBAAgB,OAAO,OAAO;IAC9B,YAAY,KAAK,SAAS;IAC1B,gBAAgB,OAAO,SAAS;IAChC,YAAY;IACZ,gBAAgB,OAAO,SAAS;IAChC;IACA,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Matrix = registerPlugin('Matrix', {\n web: () => import('./web').then((m) => new m.MatrixWeb()),\n});\nexport * from './definitions';\nexport { Matrix };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { createClient, ClientEvent, RoomEvent, RoomMemberEvent, Direction, MsgType, EventType, RelationType, UserEvent, } from 'matrix-js-sdk';\nimport { decodeRecoveryKey } from 'matrix-js-sdk/lib/crypto-api/recovery-key';\nimport { deriveRecoveryKeyFromPassphrase } from 'matrix-js-sdk/lib/crypto-api/key-passphrase';\nconst SESSION_KEY = 'matrix_session';\nexport class MatrixWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this._cryptoCallbacks = {\n getSecretStorageKey: async (opts) => {\n var _a, _b;\n const keyId = Object.keys(opts.keys)[0];\n if (!keyId)\n return null;\n // Exact match: only return the cached raw key for the key ID it was cached under.\n // (bootstrapSecretStorage uses createSecretStorageKey for the new key, so this\n // path is only reached for an already-established key — e.g. after recoverAndSetup.)\n if (this.secretStorageKey && this.secretStorageKeyId === keyId) {\n return [keyId, this.secretStorageKey];\n }\n // Derive from the current passphrase (set during recoverAndSetup)\n if (this.recoveryPassphrase) {\n const keyInfo = opts.keys[keyId];\n if (keyInfo === null || keyInfo === void 0 ? void 0 : keyInfo.passphrase) {\n const derived = await deriveRecoveryKeyFromPassphrase(this.recoveryPassphrase, keyInfo.passphrase.salt, keyInfo.passphrase.iterations, (_a = keyInfo.passphrase.bits) !== null && _a !== void 0 ? _a : 256);\n // Cache with the correct key ID for subsequent calls\n this.secretStorageKey = derived;\n this.secretStorageKeyId = keyId;\n return [keyId, derived];\n }\n }\n // Fallback: derive from the OLD passphrase when bootstrapSecretStorage is\n // migrating existing cross-signing / backup secrets into a new SSSS.\n if (this.fallbackPassphrase) {\n const keyInfo = opts.keys[keyId];\n if (keyInfo === null || keyInfo === void 0 ? void 0 : keyInfo.passphrase) {\n const derived = await deriveRecoveryKeyFromPassphrase(this.fallbackPassphrase, keyInfo.passphrase.salt, keyInfo.passphrase.iterations, (_b = keyInfo.passphrase.bits) !== null && _b !== void 0 ? _b : 256);\n return [keyId, derived];\n }\n }\n return null;\n },\n cacheSecretStorageKey: (keyId, _keyInfo, key) => {\n this.secretStorageKey = key;\n this.secretStorageKeyId = keyId;\n },\n };\n }\n // ── Auth ──────────────────────────────────────────────\n async login(options) {\n const tmpClient = createClient({ baseUrl: options.homeserverUrl });\n const res = await tmpClient.loginWithPassword(options.userId, options.password);\n this.client = createClient({\n baseUrl: options.homeserverUrl,\n accessToken: res.access_token,\n userId: res.user_id,\n deviceId: res.device_id,\n cryptoCallbacks: this._cryptoCallbacks,\n });\n const session = {\n accessToken: res.access_token,\n userId: res.user_id,\n deviceId: res.device_id,\n homeserverUrl: options.homeserverUrl,\n };\n this.persistSession(session);\n return session;\n }\n async loginWithToken(options) {\n // Stop any previously running client to avoid parallel instances that\n // would deadlock on the shared IndexedDB crypto store.\n if (this.client) {\n this.client.stopClient();\n this.client = undefined;\n }\n this.client = createClient({\n baseUrl: options.homeserverUrl,\n accessToken: options.accessToken,\n userId: options.userId,\n deviceId: options.deviceId,\n cryptoCallbacks: this._cryptoCallbacks,\n });\n const session = {\n accessToken: options.accessToken,\n userId: options.userId,\n deviceId: options.deviceId,\n homeserverUrl: options.homeserverUrl,\n };\n this.persistSession(session);\n return session;\n }\n async logout() {\n if (this.client) {\n this.client.stopClient();\n try {\n await this.client.logout(true);\n }\n catch (_a) {\n // ignore logout errors (e.g. token already invalidated)\n }\n this.client = undefined;\n }\n localStorage.removeItem(SESSION_KEY);\n }\n async clearAllData() {\n if (this.client) {\n this.client.stopClient();\n this.client = undefined;\n }\n // Reset all cached crypto state\n this.secretStorageKey = undefined;\n this.secretStorageKeyId = undefined;\n this.recoveryPassphrase = undefined;\n this.fallbackPassphrase = undefined;\n localStorage.removeItem(SESSION_KEY);\n await this.deleteCryptoStore();\n }\n async getSession() {\n const raw = localStorage.getItem(SESSION_KEY);\n if (!raw)\n return null;\n try {\n return JSON.parse(raw);\n }\n catch (_a) {\n return null;\n }\n }\n // ── Sync ──────────────────────────────────────────────\n async startSync() {\n this.requireClient();\n this.client.on(ClientEvent.Sync, (state, _prev, data) => {\n var _a;\n const mapped = this.mapSyncState(state);\n this.notifyListeners('syncStateChange', {\n state: mapped,\n error: (_a = data === null || data === void 0 ? void 0 : data.error) === null || _a === void 0 ? void 0 : _a.message,\n });\n });\n this.client.on(RoomEvent.Timeline, (event, room) => {\n var _a;\n this.notifyListeners('messageReceived', {\n event: this.serializeEvent(event, room === null || room === void 0 ? void 0 : room.roomId),\n });\n // When an encrypted event arrives, listen for decryption and re-notify\n if (event.isBeingDecrypted() || event.getType() === 'm.room.encrypted') {\n event.once('Event.decrypted', () => {\n this.notifyListeners('messageReceived', {\n event: this.serializeEvent(event, room === null || room === void 0 ? void 0 : room.roomId),\n });\n });\n }\n // When a reaction or redaction arrives, re-emit the parent event with updated aggregated reactions\n if (event.getType() === EventType.Reaction || event.getType() === EventType.RoomRedaction) {\n const rel = (_a = event.getContent()) === null || _a === void 0 ? void 0 : _a['m.relates_to'];\n const targetId = (rel === null || rel === void 0 ? void 0 : rel.event_id) || event.getAssociatedId();\n if (targetId && room) {\n const targetEvent = room.findEventById(targetId);\n if (targetEvent) {\n // Small delay to let the SDK finish aggregation\n setTimeout(() => {\n this.notifyListeners('messageReceived', {\n event: this.serializeEvent(targetEvent, room.roomId),\n });\n }, 100);\n }\n }\n }\n });\n this.client.on(RoomEvent.Receipt, (event, room) => {\n var _a, _b;\n const receiptContent = event.getContent();\n for (const [eventId, receiptTypes] of Object.entries(receiptContent)) {\n const mRead = (_a = receiptTypes['m.read']) !== null && _a !== void 0 ? _a : {};\n for (const userId of Object.keys(mRead)) {\n this.notifyListeners('receiptReceived', {\n roomId: room.roomId,\n eventId,\n userId,\n });\n }\n }\n // Re-emit own sent messages with updated read status\n const myUserId = (_b = this.client) === null || _b === void 0 ? void 0 : _b.getUserId();\n if (myUserId) {\n const timeline = room.getLiveTimeline().getEvents();\n // Walk backwards through recent events; stop after checking a reasonable batch\n const limit = Math.min(timeline.length, 50);\n for (let i = timeline.length - 1; i >= timeline.length - limit; i--) {\n const evt = timeline[i];\n if (evt.getSender() !== myUserId)\n continue;\n const serialized = this.serializeEvent(evt, room.roomId);\n if (serialized.status === 'read') {\n this.notifyListeners('messageReceived', { event: serialized });\n }\n }\n }\n });\n this.client.on(RoomEvent.Name, (room) => {\n this.notifyListeners('roomUpdated', {\n roomId: room.roomId,\n summary: this.serializeRoom(room),\n });\n });\n this.client.on(RoomMemberEvent.Typing, (_event, member) => {\n var _a, _b;\n const roomId = member === null || member === void 0 ? void 0 : member.roomId;\n if (roomId) {\n const room = this.client.getRoom(roomId);\n if (room) {\n const typingEvent = room.currentState.getStateEvents('m.typing', '');\n const userIds = (_b = (_a = typingEvent === null || typingEvent === void 0 ? void 0 : typingEvent.getContent()) === null || _a === void 0 ? void 0 : _a.user_ids) !== null && _b !== void 0 ? _b : [];\n this.notifyListeners('typingChanged', { roomId, userIds });\n }\n }\n });\n this.client.on(UserEvent.Presence, (_event, user) => {\n var _a, _b, _c;\n this.notifyListeners('presenceChanged', {\n userId: user.userId,\n presence: {\n presence: (_a = user.presence) !== null && _a !== void 0 ? _a : 'offline',\n statusMsg: (_b = user.presenceStatusMsg) !== null && _b !== void 0 ? _b : undefined,\n lastActiveAgo: (_c = user.lastActiveAgo) !== null && _c !== void 0 ? _c : undefined,\n },\n });\n });\n await this.client.startClient({ initialSyncLimit: 20 });\n }\n async stopSync() {\n this.requireClient();\n this.client.stopClient();\n }\n async getSyncState() {\n this.requireClient();\n const raw = this.client.getSyncState();\n return { state: this.mapSyncState(raw) };\n }\n // ── Rooms ─────────────────────────────────────────────\n async createRoom(options) {\n var _a;\n this.requireClient();\n const createOpts = {\n visibility: 'private',\n };\n if (options.name)\n createOpts.name = options.name;\n if (options.topic)\n createOpts.topic = options.topic;\n if ((_a = options.invite) === null || _a === void 0 ? void 0 : _a.length)\n createOpts.invite = options.invite;\n if (options.preset)\n createOpts.preset = options.preset;\n if (options.isDirect)\n createOpts.is_direct = true;\n const initialState = [];\n if (options.isEncrypted) {\n initialState.push({\n type: 'm.room.encryption',\n state_key: '',\n content: { algorithm: 'm.megolm.v1.aes-sha2' },\n });\n }\n if (options.historyVisibility) {\n initialState.push({\n type: 'm.room.history_visibility',\n state_key: '',\n content: { history_visibility: options.historyVisibility },\n });\n }\n if (initialState.length > 0) {\n createOpts.initial_state = initialState;\n }\n const res = await this.client.createRoom(createOpts);\n return { roomId: res.room_id };\n }\n async getRooms() {\n this.requireClient();\n const rooms = this.client.getRooms().map((r) => this.serializeRoom(r));\n return { rooms };\n }\n async getRoomMembers(options) {\n this.requireClient();\n const room = this.client.getRoom(options.roomId);\n if (!room)\n throw new Error(`Room ${options.roomId} not found`);\n await room.loadMembersIfNeeded();\n const members = room.getMembers().map((m) => {\n var _a, _b;\n return ({\n userId: m.userId,\n displayName: (_a = m.name) !== null && _a !== void 0 ? _a : undefined,\n membership: m.membership,\n avatarUrl: (_b = m.getMxcAvatarUrl()) !== null && _b !== void 0 ? _b : undefined,\n });\n });\n return { members };\n }\n async joinRoom(options) {\n this.requireClient();\n const room = await this.client.joinRoom(options.roomIdOrAlias);\n return { roomId: room.roomId };\n }\n async leaveRoom(options) {\n this.requireClient();\n await this.client.leave(options.roomId);\n }\n async forgetRoom(options) {\n this.requireClient();\n await this.client.forget(options.roomId);\n }\n // ── Messaging ─────────────────────────────────────────\n async sendMessage(options) {\n var _a, _b, _c;\n this.requireClient();\n const msgtype = (_a = options.msgtype) !== null && _a !== void 0 ? _a : 'm.text';\n const mediaTypes = ['m.image', 'm.audio', 'm.video', 'm.file'];\n if (mediaTypes.includes(msgtype) && options.fileUri) {\n // Media message: upload file then send\n const response = await fetch(options.fileUri);\n const blob = await response.blob();\n const uploadRes = await this.client.uploadContent(blob, {\n name: options.fileName,\n type: options.mimeType,\n });\n const mxcUrl = uploadRes.content_uri;\n const content = {\n msgtype,\n body: options.body || options.fileName || 'file',\n url: mxcUrl,\n info: Object.assign(Object.assign(Object.assign({ mimetype: options.mimeType, size: (_b = options.fileSize) !== null && _b !== void 0 ? _b : blob.size }, (options.duration !== undefined && { duration: options.duration })), (options.width !== undefined && { w: options.width })), (options.height !== undefined && { h: options.height })),\n };\n const res = await this.client.sendMessage(options.roomId, content);\n return { eventId: res.event_id };\n }\n // Text message\n const msgtypeMap = {\n 'm.text': MsgType.Text,\n 'm.notice': MsgType.Notice,\n 'm.emote': MsgType.Emote,\n };\n const mappedType = (_c = msgtypeMap[msgtype]) !== null && _c !== void 0 ? _c : MsgType.Text;\n const res = await this.client.sendMessage(options.roomId, {\n msgtype: mappedType,\n body: options.body,\n });\n return { eventId: res.event_id };\n }\n async editMessage(options) {\n var _a, _b;\n this.requireClient();\n const msgtype = (_a = options.msgtype) !== null && _a !== void 0 ? _a : 'm.text';\n const mediaTypes = ['m.image', 'm.audio', 'm.video', 'm.file'];\n let newContent;\n if (mediaTypes.includes(msgtype) && options.fileUri) {\n const response = await fetch(options.fileUri);\n const blob = await response.blob();\n const uploadRes = await this.client.uploadContent(blob, {\n name: options.fileName,\n type: options.mimeType,\n });\n newContent = {\n msgtype,\n body: options.newBody || options.fileName || 'file',\n url: uploadRes.content_uri,\n info: Object.assign(Object.assign(Object.assign({ mimetype: options.mimeType, size: (_b = options.fileSize) !== null && _b !== void 0 ? _b : blob.size }, (options.duration !== undefined && { duration: options.duration })), (options.width !== undefined && { w: options.width })), (options.height !== undefined && { h: options.height })),\n };\n }\n else {\n newContent = {\n msgtype,\n body: options.newBody,\n };\n }\n const content = Object.assign(Object.assign({}, newContent), { body: `* ${options.newBody}`, 'm.new_content': newContent, 'm.relates_to': {\n rel_type: 'm.replace',\n event_id: options.eventId,\n } });\n const res = await this.client.sendMessage(options.roomId, content);\n return { eventId: res.event_id };\n }\n async sendReply(options) {\n var _a, _b;\n this.requireClient();\n const msgtype = (_a = options.msgtype) !== null && _a !== void 0 ? _a : 'm.text';\n const mediaTypes = ['m.image', 'm.audio', 'm.video', 'm.file'];\n let content;\n if (mediaTypes.includes(msgtype) && options.fileUri) {\n // Media reply: upload file then send with reply relation\n const response = await fetch(options.fileUri);\n const blob = await response.blob();\n const uploadRes = await this.client.uploadContent(blob, {\n name: options.fileName,\n type: options.mimeType,\n });\n content = {\n msgtype,\n body: options.body || options.fileName || 'file',\n url: uploadRes.content_uri,\n info: Object.assign(Object.assign(Object.assign({ mimetype: options.mimeType, size: (_b = options.fileSize) !== null && _b !== void 0 ? _b : blob.size }, (options.duration !== undefined && { duration: options.duration })), (options.width !== undefined && { w: options.width })), (options.height !== undefined && { h: options.height })),\n 'm.relates_to': {\n 'm.in_reply_to': {\n event_id: options.replyToEventId,\n },\n },\n };\n }\n else {\n // Text reply\n content = {\n msgtype: MsgType.Text,\n body: options.body,\n 'm.relates_to': {\n 'm.in_reply_to': {\n event_id: options.replyToEventId,\n },\n },\n };\n }\n const res = await this.client.sendMessage(options.roomId, content);\n return { eventId: res.event_id };\n }\n async getRoomMessages(options) {\n var _a, _b, _c, _d, _e;\n this.requireClient();\n const limit = (_a = options.limit) !== null && _a !== void 0 ? _a : 20;\n const room = this.client.getRoom(options.roomId);\n // If no explicit pagination token, return events from the synced timeline\n if (!options.from && room) {\n // Paginate backwards so we have enough events (initial sync may be small)\n try {\n await this.client.scrollback(room, limit);\n }\n catch (_f) {\n // scrollback may fail if there's no more history\n }\n const timeline = room.getLiveTimeline();\n const timelineEvents = timeline.getEvents();\n // Filter out reactions and redactions before slicing — they're aggregated into parent events\n const displayableEvents = timelineEvents.filter((e) => {\n const t = e.getType();\n return t !== EventType.Reaction && t !== EventType.RoomRedaction;\n });\n const events = displayableEvents\n .slice(-limit)\n .map((e) => this.serializeEvent(e, options.roomId))\n .sort((a, b) => a.originServerTs - b.originServerTs);\n const backToken = (_b = timeline.getPaginationToken(Direction.Backward)) !== null && _b !== void 0 ? _b : undefined;\n return { events, nextBatch: backToken };\n }\n // Paginate further back using the token\n const fromToken = (_c = options.from) !== null && _c !== void 0 ? _c : null;\n const res = await this.client.createMessagesRequest(options.roomId, fromToken, limit, Direction.Backward);\n const events = ((_d = res.chunk) !== null && _d !== void 0 ? _d : []).map((e) => {\n var _a;\n return ({\n eventId: e.event_id,\n roomId: options.roomId,\n senderId: e.sender,\n type: e.type,\n content: ((_a = e.content) !== null && _a !== void 0 ? _a : {}),\n originServerTs: e.origin_server_ts,\n });\n });\n return { events, nextBatch: (_e = res.end) !== null && _e !== void 0 ? _e : undefined };\n }\n async markRoomAsRead(options) {\n this.requireClient();\n const room = this.client.getRoom(options.roomId);\n if (room) {\n const event = room.findEventById(options.eventId);\n if (event) {\n await this.client.sendReadReceipt(event);\n return;\n }\n }\n // Fallback to HTTP request if event not found locally\n await this.client.setRoomReadMarkersHttpRequest(options.roomId, options.eventId, options.eventId);\n }\n async refreshEventStatuses(options) {\n this.requireClient();\n const room = this.client.getRoom(options.roomId);\n if (!room)\n return { events: [] };\n const events = [];\n for (const eid of options.eventIds) {\n const event = room.findEventById(eid);\n if (event) {\n events.push(this.serializeEvent(event, options.roomId));\n }\n }\n return { events };\n }\n // ── Redactions & Reactions ───────────────────────────────\n async redactEvent(options) {\n this.requireClient();\n await this.client.redactEvent(options.roomId, options.eventId, undefined, {\n reason: options.reason,\n });\n }\n async sendReaction(options) {\n this.requireClient();\n const myUserId = this.client.getUserId();\n // Check if the user already reacted with this key — if so, toggle off (redact)\n const room = this.client.getRoom(options.roomId);\n if (room && myUserId) {\n try {\n const relations = room.relations.getChildEventsForEvent(options.eventId, RelationType.Annotation, EventType.Reaction);\n if (relations) {\n const existing = relations.getRelations().find((e) => { var _a, _b; return e.getSender() === myUserId && ((_b = (_a = e.getContent()) === null || _a === void 0 ? void 0 : _a['m.relates_to']) === null || _b === void 0 ? void 0 : _b.key) === options.key; });\n if (existing) {\n const existingId = existing.getId();\n if (existingId) {\n await this.client.redactEvent(options.roomId, existingId);\n return { eventId: existingId };\n }\n }\n }\n }\n catch (_a) {\n // fall through to send\n }\n }\n const res = await this.client.sendEvent(options.roomId, EventType.Reaction, {\n 'm.relates_to': {\n rel_type: RelationType.Annotation,\n event_id: options.eventId,\n key: options.key,\n },\n });\n return { eventId: res.event_id };\n }\n // ── Room Management ────────────────────────────────────\n async setRoomName(options) {\n this.requireClient();\n await this.client.setRoomName(options.roomId, options.name);\n }\n async setRoomTopic(options) {\n this.requireClient();\n await this.client.setRoomTopic(options.roomId, options.topic);\n }\n async setRoomAvatar(options) {\n this.requireClient();\n await this.client.sendStateEvent(options.roomId, 'm.room.avatar', { url: options.mxcUrl });\n }\n async inviteUser(options) {\n this.requireClient();\n await this.client.invite(options.roomId, options.userId);\n }\n async kickUser(options) {\n this.requireClient();\n await this.client.kick(options.roomId, options.userId, options.reason);\n }\n async banUser(options) {\n this.requireClient();\n await this.client.ban(options.roomId, options.userId, options.reason);\n }\n async unbanUser(options) {\n this.requireClient();\n await this.client.unban(options.roomId, options.userId);\n }\n // ── Typing ─────────────────────────────────────────────\n async sendTyping(options) {\n var _a;\n this.requireClient();\n await this.client.sendTyping(options.roomId, options.isTyping, (_a = options.timeout) !== null && _a !== void 0 ? _a : 30000);\n }\n // ── Media ──────────────────────────────────────────────\n async getMediaUrl(options) {\n this.requireClient();\n // Use the authenticated media endpoint (Matrix v1.11+)\n const mxcPath = options.mxcUrl.replace('mxc://', '');\n const baseUrl = this.client.getHomeserverUrl().replace(/\\/$/, '');\n const accessToken = this.client.getAccessToken();\n const httpUrl = `${baseUrl}/_matrix/client/v1/media/download/${mxcPath}?access_token=${accessToken}`;\n return { httpUrl };\n }\n async getThumbnailUrl(options) {\n var _a;\n this.requireClient();\n const mxcPath = options.mxcUrl.replace('mxc://', '');\n const baseUrl = this.client.getHomeserverUrl().replace(/\\/$/, '');\n const accessToken = this.client.getAccessToken();\n const method = (_a = options.method) !== null && _a !== void 0 ? _a : 'scale';\n const httpUrl = `${baseUrl}/_matrix/client/v1/media/thumbnail/${mxcPath}?width=${options.width}&height=${options.height}&method=${method}&access_token=${accessToken}`;\n return { httpUrl };\n }\n async uploadContent(options) {\n this.requireClient();\n const response = await fetch(options.fileUri);\n const blob = await response.blob();\n const res = await this.client.uploadContent(blob, {\n name: options.fileName,\n type: options.mimeType,\n });\n return { contentUri: res.content_uri };\n }\n // ── Presence ───────────────────────────────────────────\n async setPresence(options) {\n this.requireClient();\n await this.client.setPresence({\n presence: options.presence,\n status_msg: options.statusMsg,\n });\n }\n async getPresence(options) {\n var _a, _b, _c;\n this.requireClient();\n const user = this.client.getUser(options.userId);\n return {\n presence: (_a = user === null || user === void 0 ? void 0 : user.presence) !== null && _a !== void 0 ? _a : 'offline',\n statusMsg: (_b = user === null || user === void 0 ? void 0 : user.presenceStatusMsg) !== null && _b !== void 0 ? _b : undefined,\n lastActiveAgo: (_c = user === null || user === void 0 ? void 0 : user.lastActiveAgo) !== null && _c !== void 0 ? _c : undefined,\n };\n }\n // ── Device Management ──────────────────────────────────\n async getDevices() {\n var _a, _b;\n this.requireClient();\n const res = await this.client.getDevices();\n const crypto = this.client.getCrypto();\n const myUserId = (_a = this.client.getUserId()) !== null && _a !== void 0 ? _a : '';\n const devices = await Promise.all(((_b = res.devices) !== null && _b !== void 0 ? _b : []).map(async (d) => {\n var _a, _b, _c, _d;\n let isCrossSigningVerified;\n if (crypto) {\n try {\n const status = await crypto.getDeviceVerificationStatus(myUserId, d.device_id);\n isCrossSigningVerified = (_a = status === null || status === void 0 ? void 0 : status.crossSigningVerified) !== null && _a !== void 0 ? _a : false;\n }\n catch (_e) {\n // ignore — crypto may not be ready\n }\n }\n return {\n deviceId: d.device_id,\n displayName: (_b = d.display_name) !== null && _b !== void 0 ? _b : undefined,\n lastSeenTs: (_c = d.last_seen_ts) !== null && _c !== void 0 ? _c : undefined,\n lastSeenIp: (_d = d.last_seen_ip) !== null && _d !== void 0 ? _d : undefined,\n isCrossSigningVerified,\n };\n }));\n return { devices };\n }\n async deleteDevice(options) {\n this.requireClient();\n await this.client.deleteDevice(options.deviceId, options.auth);\n }\n // ── Push ──────────────────────────────────────────────\n async setPusher(options) {\n var _a;\n this.requireClient();\n await this.client.setPusher({\n pushkey: options.pushkey,\n kind: (_a = options.kind) !== null && _a !== void 0 ? _a : undefined,\n app_id: options.appId,\n app_display_name: options.appDisplayName,\n device_display_name: options.deviceDisplayName,\n lang: options.lang,\n data: options.data,\n });\n }\n // ── Encryption ──────────────────────────────────────────\n async initializeCrypto() {\n var _a, _b;\n this.requireClient();\n const cryptoOpts = { cryptoDatabasePrefix: 'matrix-js-sdk' };\n try {\n await this.client.initRustCrypto(cryptoOpts);\n }\n catch (e) {\n // After logout + re-login the server issues a new deviceId, but the\n // shared IndexedDB crypto store still references the old one.\n // Delete the stale store and retry so crypto initialises cleanly.\n if ((_a = e === null || e === void 0 ? void 0 : e.message) === null || _a === void 0 ? void 0 : _a.includes(\"account in the store doesn't match\")) {\n await this.deleteCryptoStore();\n await this.client.initRustCrypto(cryptoOpts);\n }\n else {\n throw e;\n }\n }\n // Flush the initial /keys/query request that initRustCrypto enqueues.\n // Without this, any call to getIdentity (e.g. via getCrossSigningStatus)\n // will spin-wait and emit periodic WARN logs until sync processes it.\n const crypto = this.client.getCrypto();\n if ((_b = crypto === null || crypto === void 0 ? void 0 : crypto.outgoingRequestsManager) === null || _b === void 0 ? void 0 : _b.doProcessOutgoingRequests) {\n await crypto.outgoingRequestsManager.doProcessOutgoingRequests();\n }\n }\n async deleteCryptoStore() {\n if (typeof indexedDB === 'undefined')\n return;\n try {\n const dbs = await indexedDB.databases();\n await Promise.all(dbs\n .filter((db) => { var _a; return (_a = db.name) === null || _a === void 0 ? void 0 : _a.startsWith('matrix-js-sdk'); })\n .map((db) => new Promise((resolve) => {\n const req = indexedDB.deleteDatabase(db.name);\n req.onsuccess = () => resolve();\n req.onerror = () => resolve();\n })));\n }\n catch (_a) {\n // indexedDB.databases() not available in all environments\n }\n }\n async getEncryptionStatus() {\n this.requireClient();\n const crypto = this.client.getCrypto();\n if (!crypto) {\n return {\n isCrossSigningReady: false,\n crossSigningStatus: { hasMaster: false, hasSelfSigning: false, hasUserSigning: false, isReady: false },\n isKeyBackupEnabled: false,\n isSecretStorageReady: false,\n };\n }\n const csReady = await crypto.isCrossSigningReady();\n const csStatus = await crypto.getCrossSigningStatus();\n const backupVersion = await crypto.getActiveSessionBackupVersion();\n // Use getSecretStorageStatus().defaultKeyId to check if secret storage was\n // set up at all, rather than isSecretStorageReady() which also checks that\n // cross-signing keys are stored (too strict for Phase 1).\n const ssStatus = await crypto.getSecretStorageStatus();\n const ssHasKey = ssStatus.defaultKeyId !== null;\n return {\n isCrossSigningReady: csReady,\n crossSigningStatus: {\n hasMaster: csStatus.publicKeysOnDevice,\n hasSelfSigning: csStatus.privateKeysCachedLocally.selfSigningKey,\n hasUserSigning: csStatus.privateKeysCachedLocally.userSigningKey,\n isReady: csReady,\n },\n isKeyBackupEnabled: backupVersion !== null,\n keyBackupVersion: backupVersion !== null && backupVersion !== void 0 ? backupVersion : undefined,\n isSecretStorageReady: ssHasKey,\n };\n }\n async bootstrapCrossSigning() {\n const crypto = await this.ensureCrypto();\n await crypto.bootstrapCrossSigning({\n setupNewCrossSigning: true,\n authUploadDeviceSigningKeys: async (makeRequest) => {\n var _a;\n // UIA flow: attempt with dummy auth, fall back to session-based retry\n try {\n await makeRequest({ type: 'm.login.dummy' });\n }\n catch (e) {\n const session = (_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.session;\n if (session) {\n await makeRequest({ type: 'm.login.dummy', session });\n }\n else {\n throw e;\n }\n }\n },\n });\n }\n async setupKeyBackup() {\n const crypto = await this.ensureCrypto();\n await crypto.resetKeyBackup();\n const version = await crypto.getActiveSessionBackupVersion();\n return { exists: true, version: version !== null && version !== void 0 ? version : undefined, enabled: true };\n }\n async getKeyBackupStatus() {\n this.requireClient();\n const crypto = this.requireCrypto();\n const version = await crypto.getActiveSessionBackupVersion();\n return {\n exists: version !== null,\n version: version !== null && version !== void 0 ? version : undefined,\n enabled: version !== null,\n };\n }\n async restoreKeyBackup(_options) {\n var _a;\n this.requireClient();\n const crypto = this.requireCrypto();\n const result = await crypto.restoreKeyBackup();\n return { importedKeys: (_a = result === null || result === void 0 ? void 0 : result.imported) !== null && _a !== void 0 ? _a : 0 };\n }\n async setupRecovery(options) {\n var _a;\n const crypto = await this.ensureCrypto();\n const keyInfo = await crypto.createRecoveryKeyFromPassphrase(options === null || options === void 0 ? void 0 : options.passphrase);\n // Pre-cache the new key bytes. secretStorageKeyId will be set by\n // cacheSecretStorageKey once bootstrapSecretStorage writes the new key\n // into SSSS and the SDK calls back.\n this.secretStorageKey = keyInfo.privateKey;\n this.secretStorageKeyId = undefined;\n // If the caller provides the same or old passphrase, keep it so\n // getSecretStorageKey can derive the key for the SDK.\n if (options === null || options === void 0 ? void 0 : options.passphrase) {\n this.recoveryPassphrase = options.passphrase;\n }\n // If the caller knows the OLD passphrase, keep it as fallbackPassphrase so\n // that getSecretStorageKey can decrypt the existing SSSS during\n // bootstrapSecretStorage's migration of cross-signing / backup secrets.\n if (options === null || options === void 0 ? void 0 : options.existingPassphrase) {\n this.fallbackPassphrase = options.existingPassphrase;\n }\n try {\n const bootstrapPromise = crypto.bootstrapSecretStorage({\n createSecretStorageKey: async () => keyInfo,\n setupNewSecretStorage: true,\n setupNewKeyBackup: true,\n });\n // Guard against SDK hanging when it can't retrieve the old SSSS key\n const timeoutPromise = new Promise((_, reject) => {\n setTimeout(() => reject(new Error('bootstrapSecretStorage timed out — the old SSSS key could not be retrieved')), 30000);\n });\n await Promise.race([bootstrapPromise, timeoutPromise]);\n }\n finally {\n // Always clear transient crypto state so it doesn't bleed into subsequent calls.\n this.fallbackPassphrase = undefined;\n this.recoveryPassphrase = undefined;\n }\n return { recoveryKey: (_a = keyInfo.encodedPrivateKey) !== null && _a !== void 0 ? _a : '' };\n }\n async isRecoveryEnabled() {\n const crypto = await this.ensureCrypto();\n const ready = await crypto.isSecretStorageReady();\n return { enabled: ready };\n }\n async recoverAndSetup(options) {\n const crypto = await this.ensureCrypto();\n // Derive/decode the secret storage key\n if (options.recoveryKey) {\n this.secretStorageKey = decodeRecoveryKey(options.recoveryKey);\n }\n else if (options.passphrase) {\n // Store passphrase — the getSecretStorageKey callback will derive\n // the key using the server's stored PBKDF2 params (salt, iterations)\n this.recoveryPassphrase = options.passphrase;\n this.secretStorageKey = undefined; // Clear any stale raw key\n }\n else {\n throw new Error('Either recoveryKey or passphrase must be provided');\n }\n // Load the backup decryption key from secret storage into the Rust crypto store.\n // This triggers the getSecretStorageKey callback.\n try {\n await crypto.loadSessionBackupPrivateKeyFromSecretStorage();\n }\n catch (e) {\n const msg = e instanceof Error ? e.message : String(e);\n if (msg.includes('decryption key does not match')) {\n // The passphrase is correct (SSSS decrypted fine), but the backup key\n // stored in SSSS doesn't match the server's current backup. This happens\n // when another client re-created the backup without updating SSSS, or\n // vice-versa. Auto-fix by creating a new backup that matches the SSSS key.\n // recoveryPassphrase / secretStorageKey are still set, so the\n // getSecretStorageKey callback can decrypt the existing SSSS.\n await crypto.bootstrapSecretStorage({\n setupNewKeyBackup: true,\n });\n await crypto.checkKeyBackupAndEnable();\n return;\n }\n // Different error — clear state and throw\n this.secretStorageKey = undefined;\n this.secretStorageKeyId = undefined;\n this.recoveryPassphrase = undefined;\n throw e;\n }\n // Now that the key is stored locally, activate backup in the running client\n await crypto.checkKeyBackupAndEnable();\n }\n async resetRecoveryKey(options) {\n return this.setupRecovery(options);\n }\n async exportRoomKeys(options) {\n this.requireClient();\n const crypto = this.requireCrypto();\n const keys = await crypto.exportRoomKeysAsJson();\n // The exported JSON is not encrypted by default; for passphrase encryption\n // the caller should handle it, or we return the raw JSON\n void options.passphrase; // passphrase encryption is handled natively; on web we return raw\n return { data: keys };\n }\n async importRoomKeys(options) {\n this.requireClient();\n const crypto = this.requireCrypto();\n void options.passphrase; // passphrase decryption handled natively; on web we import raw\n await crypto.importRoomKeysAsJson(options.data);\n return { importedKeys: -1 }; // count not available from importRoomKeysAsJson\n }\n // ── Helpers ───────────────────────────────────────────\n requireClient() {\n if (!this.client) {\n throw new Error('Not logged in. Call login() or loginWithToken() first.');\n }\n }\n requireCrypto() {\n const crypto = this.client.getCrypto();\n if (!crypto) {\n throw new Error('Crypto not initialized. Call initializeCrypto() first.');\n }\n return crypto;\n }\n async ensureCrypto() {\n this.requireClient();\n if (!this.client.getCrypto()) {\n await this.initializeCrypto();\n }\n return this.requireCrypto();\n }\n persistSession(session) {\n localStorage.setItem(SESSION_KEY, JSON.stringify(session));\n }\n serializeEvent(event, fallbackRoomId) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n const roomId = (_b = (_a = event.getRoomId()) !== null && _a !== void 0 ? _a : fallbackRoomId) !== null && _b !== void 0 ? _b : '';\n // Redacted events should be marked clearly\n if (event.isRedacted()) {\n return {\n eventId: (_c = event.getId()) !== null && _c !== void 0 ? _c : '',\n roomId,\n senderId: (_d = event.getSender()) !== null && _d !== void 0 ? _d : '',\n type: 'm.room.redaction',\n content: { body: 'Message deleted' },\n originServerTs: event.getTs(),\n };\n }\n const content = Object.assign({}, ((_e = event.getContent()) !== null && _e !== void 0 ? _e : {}));\n // Include aggregated reactions from the room's relations container\n const eventId = event.getId();\n if (eventId && roomId) {\n const room = (_f = this.client) === null || _f === void 0 ? void 0 : _f.getRoom(roomId);\n if (room) {\n try {\n const relations = room.relations.getChildEventsForEvent(eventId, RelationType.Annotation, EventType.Reaction);\n if (relations) {\n const sorted = relations.getSortedAnnotationsByKey();\n if (sorted && sorted.length > 0) {\n content.reactions = sorted.map(([key, events]) => ({\n key,\n count: events.size,\n senders: Array.from(events).map((e) => e.getSender()),\n }));\n }\n }\n }\n catch (_k) {\n // relations may not be available\n }\n }\n }\n // Determine delivery/read status\n let status;\n const readBy = [];\n const myUserId = (_g = this.client) === null || _g === void 0 ? void 0 : _g.getUserId();\n const sender = event.getSender();\n const room = eventId && roomId ? (_h = this.client) === null || _h === void 0 ? void 0 : _h.getRoom(roomId) : undefined;\n if (sender === myUserId && eventId) {\n // Own message — check delivery status\n const evtStatus = event.status; // null = sent & echoed, 'sending', 'sent', etc.\n if (evtStatus === 'sending' || evtStatus === 'encrypting' || evtStatus === 'queued') {\n status = 'sending';\n }\n else {\n // Event is at least sent; check if anyone has read it\n if (room) {\n try {\n const members = room.getJoinedMembers();\n for (const member of members) {\n if (member.userId === myUserId)\n continue;\n if (room.hasUserReadEvent(member.userId, eventId)) {\n readBy.push(member.userId);\n }\n }\n }\n catch (_l) {\n // ignore errors\n }\n }\n status = readBy.length > 0 ? 'read' : 'sent';\n }\n }\n else if (eventId && room) {\n // Other's message — collect who has read it\n try {\n const members = room.getJoinedMembers();\n for (const member of members) {\n if (member.userId === sender)\n continue;\n if (room.hasUserReadEvent(member.userId, eventId)) {\n readBy.push(member.userId);\n }\n }\n }\n catch (_m) {\n // ignore\n }\n }\n // Include unsigned data (e.g. m.relations for edits, transaction_id for local echo)\n const unsignedData = (_j = event.getUnsigned) === null || _j === void 0 ? void 0 : _j.call(event);\n const unsigned = unsignedData && Object.keys(unsignedData).length > 0\n ? unsignedData\n : undefined;\n return {\n eventId: eventId !== null && eventId !== void 0 ? eventId : '',\n roomId,\n senderId: sender !== null && sender !== void 0 ? sender : '',\n type: event.getType(),\n content,\n originServerTs: event.getTs(),\n status,\n readBy: readBy.length > 0 ? readBy : undefined,\n unsigned,\n };\n }\n serializeRoom(room) {\n var _a, _b, _c, _d, _e, _f;\n // Detect DM: check m.direct account data or guess from room state\n let isDirect = false;\n try {\n const directEvent = (_a = this.client) === null || _a === void 0 ? void 0 : _a.getAccountData('m.direct');\n if (directEvent) {\n const directContent = directEvent.getContent();\n for (const roomIds of Object.values(directContent)) {\n if (roomIds.includes(room.roomId)) {\n isDirect = true;\n break;\n }\n }\n }\n }\n catch (_g) {\n // ignore\n }\n // Get avatar URL\n let avatarUrl;\n const avatarEvent = room.currentState.getStateEvents('m.room.avatar', '');\n if (avatarEvent) {\n const mxcUrl = (_b = avatarEvent.getContent()) === null || _b === void 0 ? void 0 : _b.url;\n if (mxcUrl) {\n avatarUrl = mxcUrl;\n }\n }\n return {\n roomId: room.roomId,\n name: room.name,\n topic: (_e = (_d = (_c = room.currentState.getStateEvents('m.room.topic', '')) === null || _c === void 0 ? void 0 : _c.getContent()) === null || _d === void 0 ? void 0 : _d.topic) !== null && _e !== void 0 ? _e : undefined,\n memberCount: room.getJoinedMemberCount(),\n isEncrypted: room.hasEncryptionStateEvent(),\n unreadCount: (_f = room.getUnreadNotificationCount()) !== null && _f !== void 0 ? _f : 0,\n lastEventTs: room.getLastActiveTimestamp() || undefined,\n membership: room.getMyMembership(),\n avatarUrl,\n isDirect,\n };\n }\n async searchUsers(options) {\n var _a;\n this.requireClient();\n const resp = await this.client.searchUserDirectory({\n term: options.searchTerm,\n limit: (_a = options.limit) !== null && _a !== void 0 ? _a : 10,\n });\n return {\n results: resp.results.map((u) => ({\n userId: u.user_id,\n displayName: u.display_name,\n avatarUrl: u.avatar_url,\n })),\n limited: resp.limited,\n };\n }\n mapSyncState(state) {\n switch (state) {\n case 'PREPARED':\n case 'SYNCING':\n case 'CATCHUP':\n case 'RECONNECTING':\n return 'SYNCING';\n case 'ERROR':\n return 'ERROR';\n case 'STOPPED':\n return 'STOPPED';\n default:\n return 'INITIAL';\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","deriveRecoveryKeyFromPassphrase","createClient","ClientEvent","RoomEvent","EventType","RoomMemberEvent","UserEvent","MsgType","Direction","RelationType","decod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|
|
|
164
164
|
onSyncState: @escaping (String) -> Void,
|
|
165
165
|
onMessage: @escaping ([String: Any]) -> Void,
|
|
166
166
|
onRoomUpdate: @escaping (String, [String: Any]) -> Void,
|
|
167
|
-
onReceipt: @escaping (String) -> Void
|
|
167
|
+
onReceipt: @escaping (_ roomId: String, _ eventId: String, _ userId: String) -> Void
|
|
168
168
|
) async throws {
|
|
169
169
|
guard let c = client else {
|
|
170
170
|
throw MatrixBridgeError.notLoggedIn
|
|
@@ -213,7 +213,7 @@ class MatrixSDKBridge {
|
|
|
213
213
|
/// ephemeral events. The Rust SDK receives receipts via sliding sync
|
|
214
214
|
/// but doesn't expose them through readReceipts() on timeline items,
|
|
215
215
|
/// so this parallel connection provides live receipt updates.
|
|
216
|
-
private func startReceiptSync(onReceipt: @escaping (String) -> Void) {
|
|
216
|
+
private func startReceiptSync(onReceipt: @escaping (_ roomId: String, _ eventId: String, _ userId: String) -> Void) {
|
|
217
217
|
guard let session = sessionStore.load() else { return }
|
|
218
218
|
|
|
219
219
|
receiptSyncTask?.cancel()
|
|
@@ -395,9 +395,9 @@ class MatrixSDKBridge {
|
|
|
395
395
|
return components?.url
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
-
/// Parse receipt events from a v2 sync response and fire callbacks.
|
|
398
|
+
/// Parse receipt events from a v2 sync response and fire callbacks per (eventId, userId) pair.
|
|
399
399
|
private static func processReceiptResponse(
|
|
400
|
-
data: Data, onReceipt: @escaping (String) -> Void
|
|
400
|
+
data: Data, onReceipt: @escaping (_ roomId: String, _ eventId: String, _ userId: String) -> Void
|
|
401
401
|
) {
|
|
402
402
|
guard let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any],
|
|
403
403
|
let rooms = (json["rooms"] as? [String: Any])?["join"] as? [String: Any] else {
|
|
@@ -410,9 +410,19 @@ class MatrixSDKBridge {
|
|
|
410
410
|
continue
|
|
411
411
|
}
|
|
412
412
|
for event in events {
|
|
413
|
-
guard (event["type"] as? String) == "m.receipt"
|
|
414
|
-
|
|
415
|
-
|
|
413
|
+
guard (event["type"] as? String) == "m.receipt",
|
|
414
|
+
let content = event["content"] as? [String: Any] else { continue }
|
|
415
|
+
// Content format: { "$eventId": { "m.read": { "@user:server": { "ts": 123 } } } }
|
|
416
|
+
for (eventId, receiptTypes) in content {
|
|
417
|
+
guard let types = receiptTypes as? [String: Any] else { continue }
|
|
418
|
+
for receiptType in ["m.read", "m.read.private"] {
|
|
419
|
+
guard let readers = types[receiptType] as? [String: Any] else { continue }
|
|
420
|
+
for userId in readers.keys {
|
|
421
|
+
print("[CapMatrix] receiptSync: receipt roomId=\(roomId) eventId=\(eventId) userId=\(userId)")
|
|
422
|
+
onReceipt(roomId, eventId, userId)
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
416
426
|
}
|
|
417
427
|
}
|
|
418
428
|
}
|
|
@@ -892,6 +902,7 @@ class MatrixSDKBridge {
|
|
|
892
902
|
"displayName": device["display_name"] as Any,
|
|
893
903
|
"lastSeenTs": device["last_seen_ts"] as Any,
|
|
894
904
|
"lastSeenIp": device["last_seen_ip"] as Any,
|
|
905
|
+
"isCrossSigningVerified": false, // TODO: wire up Rust SDK per-device verification
|
|
895
906
|
]
|
|
896
907
|
}
|
|
897
908
|
}
|
|
@@ -56,6 +56,7 @@ public class MatrixPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
56
56
|
CAPPluginMethod(name: "getDevices", returnType: CAPPluginReturnPromise),
|
|
57
57
|
CAPPluginMethod(name: "deleteDevice", returnType: CAPPluginReturnPromise),
|
|
58
58
|
CAPPluginMethod(name: "setPusher", returnType: CAPPluginReturnPromise),
|
|
59
|
+
CAPPluginMethod(name: "clearAllData", returnType: CAPPluginReturnPromise),
|
|
59
60
|
]
|
|
60
61
|
|
|
61
62
|
private let matrixBridge = MatrixSDKBridge()
|
|
@@ -145,9 +146,9 @@ public class MatrixPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
145
146
|
self?.notifyListeners("roomUpdated", data: ["roomId": roomId, "summary": summary])
|
|
146
147
|
}
|
|
147
148
|
},
|
|
148
|
-
onReceipt: { [weak self] roomId in
|
|
149
|
+
onReceipt: { [weak self] roomId, eventId, userId in
|
|
149
150
|
DispatchQueue.main.async {
|
|
150
|
-
self?.notifyListeners("receiptReceived", data: ["roomId": roomId])
|
|
151
|
+
self?.notifyListeners("receiptReceived", data: ["roomId": roomId, "eventId": eventId, "userId": userId])
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
154
|
)
|
|
@@ -236,6 +237,10 @@ public class MatrixPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
236
237
|
return call.reject("Missing required parameters")
|
|
237
238
|
}
|
|
238
239
|
let msgtype = call.getString("msgtype") ?? "m.text"
|
|
240
|
+
// Media info fields — consumed by the bridge when media sending is fully implemented
|
|
241
|
+
_ = call.getInt("duration")
|
|
242
|
+
_ = call.getInt("width")
|
|
243
|
+
_ = call.getInt("height")
|
|
239
244
|
|
|
240
245
|
Task {
|
|
241
246
|
do {
|
|
@@ -391,6 +396,9 @@ public class MatrixPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
391
396
|
|
|
392
397
|
@objc func setupRecovery(_ call: CAPPluginCall) {
|
|
393
398
|
let passphrase = call.getString("passphrase")
|
|
399
|
+
// existingPassphrase is a web-only hint for SSSS migration; the Rust SDK
|
|
400
|
+
// handles migration internally on iOS. Read and ignore for now.
|
|
401
|
+
_ = call.getString("existingPassphrase")
|
|
394
402
|
|
|
395
403
|
Task {
|
|
396
404
|
do {
|
|
@@ -677,6 +685,11 @@ public class MatrixPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
677
685
|
let newBody = call.getString("newBody") else {
|
|
678
686
|
return call.reject("Missing required parameters")
|
|
679
687
|
}
|
|
688
|
+
// Media edit fields — not yet implemented in the native bridge
|
|
689
|
+
_ = call.getString("msgtype")
|
|
690
|
+
_ = call.getInt("duration")
|
|
691
|
+
_ = call.getInt("width")
|
|
692
|
+
_ = call.getInt("height")
|
|
680
693
|
|
|
681
694
|
Task {
|
|
682
695
|
do {
|
|
@@ -695,6 +708,10 @@ public class MatrixPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
695
708
|
return call.reject("Missing required parameters")
|
|
696
709
|
}
|
|
697
710
|
let msgtype = call.getString("msgtype") ?? "m.text"
|
|
711
|
+
// Media info fields — consumed by the bridge when media sending is fully implemented
|
|
712
|
+
_ = call.getInt("duration")
|
|
713
|
+
_ = call.getInt("width")
|
|
714
|
+
_ = call.getInt("height")
|
|
698
715
|
|
|
699
716
|
Task {
|
|
700
717
|
do {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tagea/capacitor-matrix",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "A capacitor plugin wrapping native matrix SDKs",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"build:watch": "npx -y nodemon --watch src -e ts --exec \"npm run build || true\"",
|
|
47
47
|
"clean": "rimraf ./dist",
|
|
48
48
|
"watch": "tsc --watch",
|
|
49
|
-
"prepublishOnly": "npm run build"
|
|
49
|
+
"prepublishOnly": "npm run build",
|
|
50
|
+
"release": "bash scripts/release.sh"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@capacitor/android": "^8.0.0",
|