@ethora/chat-component-rn 26.10.7 → 26.10.9
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/CHANGELOG.md +10 -0
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +3 -3
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/Message.js +16 -6
- package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js +16 -2
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/callActions.js +32 -2
- package/lib/commonjs/components/VideoCalls/callActions.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/systemCall.js +83 -0
- package/lib/commonjs/components/VideoCalls/systemCall.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/useCallKeep.js +84 -69
- package/lib/commonjs/components/VideoCalls/useCallKeep.js.map +1 -1
- package/lib/commonjs/helpers/incomingCallFromPush.js +95 -21
- package/lib/commonjs/helpers/incomingCallFromPush.js.map +1 -1
- package/lib/commonjs/main.js +33 -0
- package/lib/commonjs/main.js.map +1 -1
- package/lib/commonjs/networking/callTokenStanza.js +19 -1
- package/lib/commonjs/networking/callTokenStanza.js.map +1 -1
- package/lib/commonjs/networking/xmpp/sendMessageReaction.xmpp.js +22 -6
- package/lib/commonjs/networking/xmpp/sendMessageReaction.xmpp.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/push/sealedPush.js +13 -2
- package/lib/commonjs/push/sealedPush.js.map +1 -1
- package/lib/commonjs/push/sealedPushTask.js +63 -18
- package/lib/commonjs/push/sealedPushTask.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/components/Menu/HeaderRoomListMenu.js +3 -3
- package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/module/components/MessageBubble/Message.js +16 -6
- package/lib/module/components/MessageBubble/Message.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallOverlay.js +17 -3
- package/lib/module/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/module/components/VideoCalls/callActions.js +29 -0
- package/lib/module/components/VideoCalls/callActions.js.map +1 -1
- package/lib/module/components/VideoCalls/systemCall.js +73 -0
- package/lib/module/components/VideoCalls/systemCall.js.map +1 -0
- package/lib/module/components/VideoCalls/useCallKeep.js +79 -68
- package/lib/module/components/VideoCalls/useCallKeep.js.map +1 -1
- package/lib/module/helpers/incomingCallFromPush.js +92 -22
- package/lib/module/helpers/incomingCallFromPush.js.map +1 -1
- package/lib/module/main.js +3 -0
- package/lib/module/main.js.map +1 -1
- package/lib/module/networking/callTokenStanza.js +19 -1
- package/lib/module/networking/callTokenStanza.js.map +1 -1
- package/lib/module/networking/xmpp/sendMessageReaction.xmpp.js +21 -6
- package/lib/module/networking/xmpp/sendMessageReaction.xmpp.js.map +1 -1
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/push/sealedPush.js +11 -1
- package/lib/module/push/sealedPush.js.map +1 -1
- package/lib/module/push/sealedPushTask.js +62 -18
- package/lib/module/push/sealedPushTask.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/Message.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/VideoCallOverlay.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/callActions.d.ts +6 -0
- package/lib/typescript/components/VideoCalls/callActions.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/systemCall.d.ts +25 -0
- package/lib/typescript/components/VideoCalls/systemCall.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/useCallKeep.d.ts +8 -23
- package/lib/typescript/components/VideoCalls/useCallKeep.d.ts.map +1 -1
- package/lib/typescript/helpers/incomingCallFromPush.d.ts +5 -13
- package/lib/typescript/helpers/incomingCallFromPush.d.ts.map +1 -1
- package/lib/typescript/main.d.ts +6 -1
- package/lib/typescript/main.d.ts.map +1 -1
- package/lib/typescript/networking/callTokenStanza.d.ts.map +1 -1
- package/lib/typescript/networking/xmpp/sendMessageReaction.xmpp.d.ts +13 -1
- package/lib/typescript/networking/xmpp/sendMessageReaction.xmpp.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts +2 -4
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/push/sealedPush.d.ts +6 -0
- package/lib/typescript/push/sealedPush.d.ts.map +1 -1
- package/lib/typescript/push/sealedPushTask.d.ts +31 -7
- package/lib/typescript/push/sealedPushTask.d.ts.map +1 -1
- package/lib/typescript/types/models/xmpp.model.d.ts +2 -4
- package/lib/typescript/types/models/xmpp.model.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +1 -1
- package/plugins/notification-service/NotificationService.swift +105 -19
- package/plugins/withNotificationServiceExtension.js +44 -4
- package/src/components/Menu/HeaderRoomListMenu.tsx +13 -8
- package/src/components/MessageBubble/Message.tsx +16 -5
- package/src/components/VideoCalls/VideoCallOverlay.tsx +18 -2
- package/src/components/VideoCalls/callActions.ts +28 -0
- package/src/components/VideoCalls/systemCall.ts +109 -0
- package/src/components/VideoCalls/useCallKeep.ts +91 -101
- package/src/helpers/incomingCallFromPush.ts +97 -26
- package/src/main.ts +9 -1
- package/src/networking/callTokenStanza.ts +20 -1
- package/src/networking/xmpp/sendMessageReaction.xmpp.ts +38 -6
- package/src/networking/xmppClient.ts +2 -2
- package/src/push/sealedPush.ts +11 -0
- package/src/push/sealedPushTask.ts +95 -16
- package/src/types/models/xmpp.model.ts +2 -1
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incomingCallFromPush.d.ts","sourceRoot":"","sources":["../../../src/helpers/incomingCallFromPush.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"incomingCallFromPush.d.ts","sourceRoot":"","sources":["../../../src/helpers/incomingCallFromPush.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAmH3D,eAAO,MAAM,cAAc,GACzB,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,EAC5C,SAAQ,cAAuB,KAC9B,OAWF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,KAC3C,OAAyC,CAAC;AAE7C,eAAO,MAAM,mBAAmB,GAC9B,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,KAC3C,OAA0C,CAAC;AAE9C,eAAO,MAAM,uBAAuB,QAAO,IAI1C,CAAC"}
|
package/lib/typescript/main.d.ts
CHANGED
|
@@ -27,6 +27,11 @@ export { ReduxWrapper as Chat } from './components/MainComponents/ReduxWrapper';
|
|
|
27
27
|
export { XmppProvider } from './context/xmppProvider';
|
|
28
28
|
export { useUnread } from './hooks/useUnreadMessagesCounter';
|
|
29
29
|
export { handlePushPayload, openRoomFromPush } from './helpers/pushPayload';
|
|
30
|
+
export { callKitUuid } from './components/VideoCalls/systemCall';
|
|
31
|
+
export { answerCallFromPush, declineCallFromPush, } from './helpers/incomingCallFromPush';
|
|
32
|
+
export type { CallPushIntent } from './helpers/incomingCallFromPush';
|
|
33
|
+
export { isCallPush, parseCallPush } from './helpers/callPush';
|
|
34
|
+
export type { ParsedCallPush } from './helpers/callPush';
|
|
30
35
|
export type { PushPayloadOutcome } from './helpers/pushPayload';
|
|
31
36
|
export { registerPushToken, unregisterPushToken, getRegisteredPushToken, getRegisteredPushTokens, } from './services/pushRegistration';
|
|
32
37
|
export type { RegisterPushTokenOptions, RegisterPushTokenOutcome, UnregisterPushTokenOutcome, RegisteredPushToken, } from './services/pushRegistration';
|
|
@@ -36,7 +41,7 @@ export type { PushTokenType, PushTokenRegistration } from './types/types';
|
|
|
36
41
|
export { ensurePushKeyPair, getPushKeyPair, resetPushKeyPair, clearPushKeyPair, PUSH_KEY_KEYCHAIN_SERVICE, PUSH_SECRET_KEY_ITEM, } from './push/pushKeyStore';
|
|
37
42
|
export type { PushKeyPair } from './push/pushKeyStore';
|
|
38
43
|
export { registerSealedPushTask, presentSealedPush, SEALED_PUSH_TASK, } from './push/sealedPushTask';
|
|
39
|
-
export type { SealedPushTaskOptions } from './push/sealedPushTask';
|
|
44
|
+
export type { SealedPushTaskOptions, ShownMessagePush } from './push/sealedPushTask';
|
|
40
45
|
export { openSealedPush, isSealedPush, sealedPushEnvelopeOf, SEALED_PUSH_ALG, } from './push/sealedPush';
|
|
41
46
|
export type { SealedPushEnvelope, SealedPushContent, SealedPushFailure, OpenSealedPushResult, } from './push/sealedPush';
|
|
42
47
|
export { useChatRoomFocus } from './hooks/useChatRoomFocus';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,gCAAgC,CAAC;AAGxC,OAAO,EAAE,YAAY,IAAI,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAm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,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAIpD,YAAY,EACV,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,uBAAuB,EACvB,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAQjE,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,cAAc,GACf,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC9E,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callTokenStanza.d.ts","sourceRoot":"","sources":["../../../src/networking/callTokenStanza.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"callTokenStanza.d.ts","sourceRoot":"","sources":["../../../src/networking/callTokenStanza.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AA2U9B,eAAO,MAAM,kBAAkB,GAAI,QAAQ,OAAO,KAAG,OA8PpD,CAAC;AAYF,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;AAE9E,eAAO,MAAM,mBAAmB,GAC9B,OAAO,eAAe,EACtB,UAAU;IACR,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,KACA,IA0CF,CAAC;AAUF,eAAO,MAAM,oBAAoB,GAC/B,MAAM,OAAO,GAAG,OAAO,EACvB,SAAS;IACP,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,KACA,IA6BF,CAAC"}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
import { Client } from '@xmpp/client';
|
|
2
|
-
export
|
|
2
|
+
export interface ReactionStanzaData {
|
|
3
|
+
firstName?: string;
|
|
4
|
+
lastName?: string;
|
|
5
|
+
photoURL?: string;
|
|
6
|
+
push?: boolean;
|
|
7
|
+
messageAuthor?: string;
|
|
8
|
+
messageText?: string;
|
|
9
|
+
isMediafile?: string;
|
|
10
|
+
mimetype?: string;
|
|
11
|
+
fileName?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const REACTION_MESSAGE_TEXT_MAX = 120;
|
|
14
|
+
export declare function sendMessageReaction(client: Client, messageId: string, roomJid: string, reactionsList: string[], data?: ReactionStanzaData): void;
|
|
3
15
|
//# sourceMappingURL=sendMessageReaction.xmpp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendMessageReaction.xmpp.d.ts","sourceRoot":"","sources":["../../../../src/networking/xmpp/sendMessageReaction.xmpp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAO,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"sendMessageReaction.xmpp.d.ts","sourceRoot":"","sources":["../../../../src/networking/xmpp/sendMessageReaction.xmpp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAO,MAAM,cAAc,CAAC;AAG3C,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EAAE,EACvB,IAAI,GAAE,kBAAuB,QAkD9B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Client } from '@xmpp/client';
|
|
2
2
|
import { IMessage, xmppSettingsInterface } from '../types/types';
|
|
3
3
|
import { HistoryPage, HistoryPageCursor } from './xmpp/getHistory.xmpp';
|
|
4
|
+
import { type ReactionStanzaData } from './xmpp/sendMessageReaction.xmpp';
|
|
4
5
|
import { RoomJoinManager } from './xmpp/roomJoinSweep';
|
|
5
6
|
type HistorySource = 'active' | 'send_ack' | 'background' | 'default';
|
|
6
7
|
interface HistoryOptions {
|
|
@@ -296,10 +297,7 @@ export declare class XmppClient {
|
|
|
296
297
|
* The caller decides when the room counts as read (see computeReadWatermark).
|
|
297
298
|
*/
|
|
298
299
|
sendDisplayedMarkerStanza(messageId: string, roomJid: string): void;
|
|
299
|
-
sendMessageReactionStanza(messageId: string, roomJid: string, reactionsList: string[], data?:
|
|
300
|
-
firstName?: string;
|
|
301
|
-
lastName?: string;
|
|
302
|
-
}): void;
|
|
300
|
+
sendMessageReactionStanza(messageId: string, roomJid: string, reactionsList: string[], data?: ReactionStanzaData): void;
|
|
303
301
|
sendTextMessageWithTranslateTagStanza(roomJID: string, firstName: string, lastName: string, photo: string, walletAddress: string, userMessage: string, notDisplayedValue?: string, isReply?: boolean, showInChannel?: boolean, mainMessage?: string, langSource?: string, customId?: string): boolean;
|
|
304
302
|
}
|
|
305
303
|
export default XmppClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xmppClient.d.ts","sourceRoot":"","sources":["../../../src/networking/xmppClient.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,MAAM,EAAO,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAQjE,OAAO,EAIL,WAAW,EACX,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"xmppClient.d.ts","sourceRoot":"","sources":["../../../src/networking/xmppClient.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,MAAM,EAAO,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAQjE,OAAO,EAIL,WAAW,EACX,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAuB,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAK/F,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAiFvD,KAA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EAChB,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE,OAAO,EACjB,aAAa,CAAC,EAAE,OAAO,EACvB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO;CA6CX;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -10,6 +10,8 @@ export interface SealedPushEnvelope {
|
|
|
10
10
|
msgID: string;
|
|
11
11
|
/** Recipient. */
|
|
12
12
|
userJid: string;
|
|
13
|
+
/** 'reaction' for a push about an emoji put on the user's message; absent for a message. */
|
|
14
|
+
type?: string;
|
|
13
15
|
/** Base64 of the sealed box; absent when the service could not seal. */
|
|
14
16
|
enc?: string;
|
|
15
17
|
}
|
|
@@ -24,7 +26,11 @@ export interface SealedPushContent {
|
|
|
24
26
|
msgID: string;
|
|
25
27
|
/** Sender avatar URL, '' when none. */
|
|
26
28
|
image: string;
|
|
29
|
+
/** 'reaction' with the emoji in `reaction`; absent for a message. */
|
|
30
|
+
type?: string;
|
|
31
|
+
reaction?: string;
|
|
27
32
|
}
|
|
33
|
+
export declare const isReactionPush: (envelope: Pick<SealedPushEnvelope, "type">) => boolean;
|
|
28
34
|
export type SealedPushFailure =
|
|
29
35
|
/** No key on this device (never generated, or the store is not readable). */
|
|
30
36
|
'no-key'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sealedPush.d.ts","sourceRoot":"","sources":["../../../src/push/sealedPush.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;I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
4
4
|
/** Android notification channel; the OS default channel when omitted. */
|
|
5
5
|
channelId?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Channel for a reaction to the user's message (a silent one, Telegram's
|
|
8
|
+
* way); `channelId` when omitted. Reactions carry no sound of their own
|
|
9
|
+
* either way.
|
|
10
|
+
*/
|
|
11
|
+
reactionChannelId?: string;
|
|
6
12
|
/** Shown when the box does not open (no key, another key, damaged). Default "New message". */
|
|
7
13
|
placeholderTitle?: string;
|
|
8
14
|
placeholderBody?: string;
|
|
15
|
+
/**
|
|
16
|
+
* An incoming-call push (data-only, high priority) while the app is not
|
|
17
|
+
* in the foreground; the host shows its own incoming-call notification
|
|
18
|
+
* (full-screen intent, Answer / Decline). Not called in the foreground,
|
|
19
|
+
* where the XMPP invite rings the in-app call screen.
|
|
20
|
+
*/
|
|
21
|
+
onCallPush?: (data: Record<string, unknown>) => void | Promise<void>;
|
|
22
|
+
onMessageShown?: (shown: ShownMessagePush) => void | Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export interface ShownMessagePush {
|
|
25
|
+
identifier: string;
|
|
26
|
+
channelId?: string;
|
|
27
|
+
title: string;
|
|
28
|
+
body: string;
|
|
29
|
+
sender: string;
|
|
30
|
+
senderJid: string;
|
|
31
|
+
chat: string;
|
|
32
|
+
chatJid: string;
|
|
33
|
+
image: string;
|
|
34
|
+
reaction: boolean;
|
|
9
35
|
}
|
|
10
|
-
/**
|
|
11
|
-
* The FCM data map out of the task payload. expo-notifications passes the
|
|
12
|
-
* message as `{ notification, data }`; the data keys are on `data`
|
|
13
|
-
* itself, `data.dataString` carries the same as a JSON string on some
|
|
14
|
-
* versions, and a Firebase `RemoteMessage` keeps them under `data.data`.
|
|
15
|
-
*/
|
|
16
36
|
export declare const sealedPushDataOf: (payload: unknown) => Record<string, unknown> | null;
|
|
37
|
+
/** The call fields of an incoming-call push in the task payload, if it is one. */
|
|
38
|
+
export declare const callPushDataOf: (payload: unknown) => Record<string, unknown> | null;
|
|
17
39
|
/**
|
|
18
40
|
* Open a sealed push and show it. One notification per chat: the room JID
|
|
19
41
|
* is the identifier, so a newer message replaces the older one the way the
|
|
20
|
-
* service's collapse key does for plain pushes.
|
|
42
|
+
* service's collapse key does for plain pushes. A reaction has its own
|
|
43
|
+
* identifier per chat (and its own channel), so it never replaces the
|
|
44
|
+
* chat's new-message notification.
|
|
21
45
|
*/
|
|
22
46
|
export declare function presentSealedPush(data: Record<string, unknown>, options?: SealedPushTaskOptions): Promise<OpenSealedPushResult | null>;
|
|
23
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sealedPushTask.d.ts","sourceRoot":"","sources":["../../../src/push/sealedPushTask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sealedPushTask.d.ts","sourceRoot":"","sources":["../../../src/push/sealedPushTask.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAYtB,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAErD,MAAM,WAAW,qBAAqB;IACpC,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8FAA8F;IAC9F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpE;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CACnB;AA+CD,eAAO,MAAM,gBAAgB,GAAI,SAAS,OAAO,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAG3B,CAAC;AAEpD,kFAAkF;AAClF,eAAO,MAAM,cAAc,GAAI,SAAS,OAAO,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAGzB,CAAC;AAgCpD;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CA4CtC;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,qBAA0B,GAAG,OAAO,CAyCnF;AAED,sBAAsB;AACtB,eAAO,MAAM,6BAA6B,QAAO,IAEhD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Client } from '@xmpp/client';
|
|
2
|
+
import type { ReactionStanzaData } from '../../networking/xmpp/sendMessageReaction.xmpp';
|
|
2
3
|
import XmppClient, { HistoryPage, HistoryPageCursor, HistoryWindowPage } from '../../networking/xmppClient';
|
|
3
4
|
import { Iso639_1Codes } from './language.model';
|
|
4
5
|
import { IMessage } from './message.model';
|
|
@@ -80,10 +81,7 @@ export interface XmppClientInterface {
|
|
|
80
81
|
getChatsPrivateStoreRequestStanza(): Promise<any>;
|
|
81
82
|
actionSetTimestampToPrivateStoreStanza(chatId: string, timestamp: number, chats?: string[]): Promise<void>;
|
|
82
83
|
sendMediaMessageStanza(roomJID: string, data: any, id?: string): void;
|
|
83
|
-
sendMessageReactionStanza(messageId: string, roomJid: string, reactionsList: string[], data?:
|
|
84
|
-
firstName?: string;
|
|
85
|
-
lastName?: string;
|
|
86
|
-
}): void;
|
|
84
|
+
sendMessageReactionStanza(messageId: string, roomJid: string, reactionsList: string[], data?: ReactionStanzaData): void;
|
|
87
85
|
sendTextMessageWithTranslateTagStanza?(roomJID: string, firstName: string, lastName: string, photo: string, walletAddress: string, userMessage: string, notDisplayedValue?: string, isReply?: boolean, showInChannel?: boolean, mainMessage?: string, langSource?: Iso639_1Codes, customId?: string): void;
|
|
88
86
|
}
|
|
89
87
|
//# sourceMappingURL=xmpp.model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xmpp.model.d.ts","sourceRoot":"","sources":["../../../../src/types/models/xmpp.model.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,UAAU,EAAE,EACjB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAExE,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,GAAG,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,aAAa,GACrB,QAAQ,GACR,UAAU,GACV,YAAY,GACZ,SAAS,CAAC;AAEd,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CA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,EAAE,MAAM,EAAE,GACf,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtE,yBAAyB,CACvB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EAAE,EACvB,IAAI,CAAC,EAAE,kBAAkB,GACxB,IAAI,CAAC;IACR,qCAAqC,CAAC,CACpC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE,OAAO,EACjB,aAAa,CAAC,EAAE,OAAO,EACvB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,aAAa,EAC1B,QAAQ,CAAC,EAAE,MAAM,GAChB,IAAI,CAAC;CACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ETHORA_CHAT_COMPONENT_VERSION = "26.10.
|
|
1
|
+
export declare const ETHORA_CHAT_COMPONENT_VERSION = "26.10.9";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import Intents
|
|
2
|
+
import UIKit
|
|
1
3
|
import UniformTypeIdentifiers
|
|
2
4
|
import UserNotifications
|
|
3
5
|
|
|
4
|
-
/// Ethora chat pushes,
|
|
6
|
+
/// Ethora chat pushes, three jobs:
|
|
5
7
|
/// - encrypted (sealed) pushes: the push carries a placeholder ("New message")
|
|
6
8
|
/// and a libsodium sealed box (`enc`) for the key this device registered
|
|
7
9
|
/// with its token. The box is opened with the secret key the app keeps in
|
|
@@ -9,11 +11,19 @@ import UserNotifications
|
|
|
9
11
|
/// the real title and text. Whatever goes wrong, the placeholder stays.
|
|
10
12
|
/// - attachment previews: a plain photo / video push carries `previewUrl`
|
|
11
13
|
/// with `mutable-content: 1`; the thumbnail is downloaded and attached.
|
|
14
|
+
/// - the sender's avatar: a push with `image` (the push service sends it
|
|
15
|
+
/// unless the app switched it off) becomes a communication notification,
|
|
16
|
+
/// the avatar next to the text with the app icon as the small badge, the
|
|
17
|
+
/// way messengers show it. Needs the app's Communication Notifications
|
|
18
|
+
/// capability and `INSendMessageIntent` in its NSUserActivityTypes (the
|
|
19
|
+
/// config plugin adds both); without them, or when the avatar does not
|
|
20
|
+
/// load, the notification shows as before.
|
|
12
21
|
class NotificationService: UNNotificationServiceExtension {
|
|
13
22
|
private let lock = NSLock()
|
|
14
23
|
private var contentHandler: ((UNNotificationContent) -> Void)?
|
|
15
24
|
private var content: UNMutableNotificationContent?
|
|
16
|
-
private var
|
|
25
|
+
private var avatar: Data?
|
|
26
|
+
private var downloads: [URLSessionDownloadTask] = []
|
|
17
27
|
|
|
18
28
|
override func didReceive(
|
|
19
29
|
_ request: UNNotificationRequest,
|
|
@@ -28,30 +38,50 @@ class NotificationService: UNNotificationServiceExtension {
|
|
|
28
38
|
|
|
29
39
|
if SealedPush.isSealed(content.userInfo) {
|
|
30
40
|
SealedPush.apply(to: content)
|
|
31
|
-
finish()
|
|
32
|
-
return
|
|
33
41
|
}
|
|
34
42
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
let group = DispatchGroup()
|
|
44
|
+
if let url = Self.httpURL(content.userInfo["previewUrl"]) {
|
|
45
|
+
group.enter()
|
|
46
|
+
fetch(url) { [weak self] location, response in
|
|
47
|
+
if let location = location, let attachment = Self.attachment(at: location, response: response, url: url) {
|
|
48
|
+
self?.attach(attachment)
|
|
49
|
+
}
|
|
50
|
+
group.leave()
|
|
51
|
+
}
|
|
38
52
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
if let url = Self.httpURL(content.userInfo["image"]) {
|
|
54
|
+
group.enter()
|
|
55
|
+
fetch(url) { [weak self] location, response in
|
|
56
|
+
if let location = location, let data = Self.imageData(at: location, response: response) {
|
|
57
|
+
self?.lock.lock()
|
|
58
|
+
self?.avatar = data
|
|
59
|
+
self?.lock.unlock()
|
|
60
|
+
}
|
|
61
|
+
group.leave()
|
|
43
62
|
}
|
|
44
|
-
self?.finish()
|
|
45
63
|
}
|
|
46
|
-
|
|
47
|
-
task.resume()
|
|
64
|
+
group.notify(queue: .global()) { [weak self] in self?.finish() }
|
|
48
65
|
}
|
|
49
66
|
|
|
50
67
|
override func serviceExtensionTimeWillExpire() {
|
|
51
|
-
|
|
68
|
+
lock.lock()
|
|
69
|
+
let tasks = downloads
|
|
70
|
+
lock.unlock()
|
|
71
|
+
tasks.forEach { $0.cancel() }
|
|
52
72
|
finish()
|
|
53
73
|
}
|
|
54
74
|
|
|
75
|
+
private func fetch(_ url: URL, completion: @escaping (URL?, URLResponse?) -> Void) {
|
|
76
|
+
let task = URLSession.shared.downloadTask(with: url) { location, response, _ in
|
|
77
|
+
completion(location, response)
|
|
78
|
+
}
|
|
79
|
+
lock.lock()
|
|
80
|
+
downloads.append(task)
|
|
81
|
+
lock.unlock()
|
|
82
|
+
task.resume()
|
|
83
|
+
}
|
|
84
|
+
|
|
55
85
|
private func attach(_ attachment: UNNotificationAttachment) {
|
|
56
86
|
lock.lock()
|
|
57
87
|
content?.attachments = [attachment]
|
|
@@ -62,13 +92,59 @@ class NotificationService: UNNotificationServiceExtension {
|
|
|
62
92
|
lock.lock()
|
|
63
93
|
let handler = contentHandler
|
|
64
94
|
let content = self.content
|
|
95
|
+
let avatar = self.avatar
|
|
65
96
|
contentHandler = nil
|
|
66
97
|
lock.unlock()
|
|
67
|
-
|
|
98
|
+
guard let handler = handler, let content = content else { return }
|
|
99
|
+
if let avatar = avatar, let withSender = Self.communication(content, avatar: avatar) {
|
|
100
|
+
handler(withSender)
|
|
101
|
+
} else {
|
|
102
|
+
handler(content)
|
|
103
|
+
}
|
|
68
104
|
}
|
|
69
105
|
|
|
70
|
-
|
|
71
|
-
|
|
106
|
+
/// The notification as an incoming message from a person with this
|
|
107
|
+
/// avatar. nil when iOS refuses it (no Communication Notifications
|
|
108
|
+
/// entitlement, for one): the caller shows the plain content then.
|
|
109
|
+
private static func communication(_ content: UNMutableNotificationContent, avatar: Data) -> UNNotificationContent? {
|
|
110
|
+
let info = content.userInfo
|
|
111
|
+
let name = content.title
|
|
112
|
+
let senderJid = (info["senderJid"] as? String) ?? ""
|
|
113
|
+
let senderId = senderJid.isEmpty ? name : senderJid
|
|
114
|
+
let chatJid = (info["jid"] as? String) ?? ""
|
|
115
|
+
let image = INImage(imageData: avatar)
|
|
116
|
+
let sender = INPerson(
|
|
117
|
+
personHandle: INPersonHandle(value: senderId, type: .unknown),
|
|
118
|
+
nameComponents: nil,
|
|
119
|
+
displayName: name,
|
|
120
|
+
image: image,
|
|
121
|
+
contactIdentifier: nil,
|
|
122
|
+
customIdentifier: senderId
|
|
123
|
+
)
|
|
124
|
+
let intent = INSendMessageIntent(
|
|
125
|
+
recipients: nil,
|
|
126
|
+
outgoingMessageType: .outgoingMessageText,
|
|
127
|
+
content: content.body,
|
|
128
|
+
speakableGroupName: nil,
|
|
129
|
+
conversationIdentifier: chatJid.isEmpty ? nil : chatJid,
|
|
130
|
+
serviceName: nil,
|
|
131
|
+
sender: sender,
|
|
132
|
+
attachments: nil
|
|
133
|
+
)
|
|
134
|
+
intent.setImage(image, forParameterNamed: \.sender)
|
|
135
|
+
let interaction = INInteraction(intent: intent, response: nil)
|
|
136
|
+
interaction.direction = .incoming
|
|
137
|
+
interaction.donate(completion: nil)
|
|
138
|
+
do {
|
|
139
|
+
return try content.updating(from: intent)
|
|
140
|
+
} catch {
|
|
141
|
+
NSLog("[EthoraNotificationService] no communication notification (%@), showing the plain one", error.localizedDescription)
|
|
142
|
+
return nil
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
private static func httpURL(_ value: Any?) -> URL? {
|
|
147
|
+
guard let raw = (value as? String)?.trimmingCharacters(in: .whitespacesAndNewlines),
|
|
72
148
|
let url = URL(string: raw),
|
|
73
149
|
let scheme = url.scheme?.lowercased(),
|
|
74
150
|
scheme == "https" || scheme == "http"
|
|
@@ -76,6 +152,13 @@ class NotificationService: UNNotificationServiceExtension {
|
|
|
76
152
|
return url
|
|
77
153
|
}
|
|
78
154
|
|
|
155
|
+
/// The downloaded avatar, when it is an image iOS can draw.
|
|
156
|
+
private static func imageData(at location: URL, response: URLResponse?) -> Data? {
|
|
157
|
+
if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) { return nil }
|
|
158
|
+
guard let data = try? Data(contentsOf: location), UIImage(data: data) != nil else { return nil }
|
|
159
|
+
return data
|
|
160
|
+
}
|
|
161
|
+
|
|
79
162
|
private static func attachment(at location: URL, response: URLResponse?, url: URL) -> UNNotificationAttachment? {
|
|
80
163
|
if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) { return nil }
|
|
81
164
|
|
|
@@ -99,7 +182,7 @@ class NotificationService: UNNotificationServiceExtension {
|
|
|
99
182
|
/// pushes"). The envelope sits next to `aps`: `v`, `alg`, `kid`, `jid`,
|
|
100
183
|
/// `msgID`, `userJid` in the clear, `enc` = base64 of the sealed box. Inside:
|
|
101
184
|
/// UTF-8 JSON with `title`, `body`, `sender`, `senderJid`, `chat`, `chatJid`,
|
|
102
|
-
/// `msgID`, `image`.
|
|
185
|
+
/// `msgID`, `image`, `previewUrl`.
|
|
103
186
|
///
|
|
104
187
|
/// The secret key is the item the SDK writes through expo-secure-store
|
|
105
188
|
/// (`src/push/pushKeyStore.ts` in @ethora/chat-component-rn): a generic
|
|
@@ -158,6 +241,9 @@ enum SealedPush {
|
|
|
158
241
|
info["enc"] = nil
|
|
159
242
|
info["chatJid"] = text(json["chatJid"])
|
|
160
243
|
info["senderJid"] = text(json["senderJid"])
|
|
244
|
+
// Downloaded by the service like the plain push's keys.
|
|
245
|
+
info["image"] = text(json["image"])
|
|
246
|
+
info["previewUrl"] = text(json["previewUrl"])
|
|
161
247
|
info["sealed"] = true
|
|
162
248
|
content.userInfo = info
|
|
163
249
|
}
|
|
@@ -5,7 +5,15 @@
|
|
|
5
5
|
* the keychain and shows the real title and text in place of the
|
|
6
6
|
* "New message" placeholder;
|
|
7
7
|
* - shows the attachment thumbnail (photo / video preview) the push service
|
|
8
|
-
* sends as `previewUrl
|
|
8
|
+
* sends as `previewUrl`;
|
|
9
|
+
* - shows the sender's avatar (`image`, unless the app switched it off on
|
|
10
|
+
* the push service) next to the text with the app icon as the small
|
|
11
|
+
* badge: a communication notification. For that the app gets the
|
|
12
|
+
* Communication Notifications capability
|
|
13
|
+
* (com.apple.developer.usernotifications.communication) and
|
|
14
|
+
* INSendMessageIntent in NSUserActivityTypes. With manual signing the
|
|
15
|
+
* App ID needs the capability switched on in the developer portal; EAS
|
|
16
|
+
* and Xcode's automatic signing do that themselves.
|
|
9
17
|
*
|
|
10
18
|
* An extension is a separate target signed with the app, so it cannot ship
|
|
11
19
|
* inside the npm package as code: this plugin writes it into ios/ on every
|
|
@@ -25,11 +33,19 @@
|
|
|
25
33
|
* Options:
|
|
26
34
|
* appleTeamId signing team of the extension; default: ios.appleTeamId,
|
|
27
35
|
* else the team already set on the app target in Xcode.
|
|
36
|
+
* communicationNotifications
|
|
37
|
+
* false leaves the capability out (the avatar is then never
|
|
38
|
+
* shown, pushes look as before); default true.
|
|
28
39
|
*/
|
|
29
40
|
|
|
30
41
|
const fs = require('fs');
|
|
31
42
|
const path = require('path');
|
|
32
|
-
const {
|
|
43
|
+
const {
|
|
44
|
+
withDangerousMod,
|
|
45
|
+
withEntitlementsPlist,
|
|
46
|
+
withInfoPlist,
|
|
47
|
+
withXcodeProject,
|
|
48
|
+
} = require('expo/config-plugins');
|
|
33
49
|
|
|
34
50
|
const TARGET_NAME = 'EthoraNotificationService';
|
|
35
51
|
const SOURCE_DIR = path.join(__dirname, 'notification-service');
|
|
@@ -37,6 +53,8 @@ const SOURCES = ['NotificationService.swift', 'SealedBox.swift'];
|
|
|
37
53
|
const FILES = [...SOURCES, 'Info.plist'];
|
|
38
54
|
const ENTITLEMENTS_FILE = `${TARGET_NAME}.entitlements`;
|
|
39
55
|
const KEYCHAIN_GROUPS_KEY = 'keychain-access-groups';
|
|
56
|
+
const COMMUNICATION_KEY = 'com.apple.developer.usernotifications.communication';
|
|
57
|
+
const SEND_MESSAGE_INTENT = 'INSendMessageIntent';
|
|
40
58
|
|
|
41
59
|
const appBundleId = (config) => {
|
|
42
60
|
const bundleId = config.ios && config.ios.bundleIdentifier;
|
|
@@ -93,6 +111,25 @@ const withAppKeychainGroup = (config) =>
|
|
|
93
111
|
return cfg;
|
|
94
112
|
});
|
|
95
113
|
|
|
114
|
+
// The sender's avatar: iOS shows a notification as a message from a person
|
|
115
|
+
// only for an app with this capability that declares the intent.
|
|
116
|
+
const withCommunicationNotifications = (config) =>
|
|
117
|
+
withInfoPlist(
|
|
118
|
+
withEntitlementsPlist(config, (cfg) => {
|
|
119
|
+
cfg.modResults[COMMUNICATION_KEY] = true;
|
|
120
|
+
return cfg;
|
|
121
|
+
}),
|
|
122
|
+
(cfg) => {
|
|
123
|
+
const types = Array.isArray(cfg.modResults.NSUserActivityTypes)
|
|
124
|
+
? cfg.modResults.NSUserActivityTypes
|
|
125
|
+
: [];
|
|
126
|
+
if (!types.includes(SEND_MESSAGE_INTENT)) {
|
|
127
|
+
cfg.modResults.NSUserActivityTypes = [...types, SEND_MESSAGE_INTENT];
|
|
128
|
+
}
|
|
129
|
+
return cfg;
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
|
|
96
133
|
const entitlementsPlist = (group) => `<?xml version="1.0" encoding="UTF-8"?>
|
|
97
134
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
98
135
|
<plist version="1.0">
|
|
@@ -183,7 +220,10 @@ const withExtensionTarget = (config, { appleTeamId } = {}) =>
|
|
|
183
220
|
return cfg;
|
|
184
221
|
});
|
|
185
222
|
|
|
186
|
-
const withNotificationServiceExtension = (config, props = {}) =>
|
|
187
|
-
|
|
223
|
+
const withNotificationServiceExtension = (config, props = {}) => {
|
|
224
|
+
let next = withAppKeychainGroup(withEasAppExtension(config));
|
|
225
|
+
if (props.communicationNotifications !== false) next = withCommunicationNotifications(next);
|
|
226
|
+
return withExtensionTarget(withExtensionFiles(next), props);
|
|
227
|
+
};
|
|
188
228
|
|
|
189
229
|
module.exports = withNotificationServiceExtension;
|
|
@@ -273,14 +273,18 @@ export const HeaderRoomListMenu: FC<HeaderRoomListMenuProps> = ({
|
|
|
273
273
|
onClick: () => void;
|
|
274
274
|
styles?: { color: string };
|
|
275
275
|
}[] = [
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
276
|
+
...(!config?.chatHeaderSettings?.disableCreate
|
|
277
|
+
? [
|
|
278
|
+
{
|
|
279
|
+
label: t('menu.newChat'),
|
|
280
|
+
icon: <AddNewIcon color={iconColor} />,
|
|
281
|
+
onClick: () => {
|
|
282
|
+
dispatch(setActiveModal(MODAL_TYPES.NEW_CHAT));
|
|
283
|
+
},
|
|
284
|
+
styles: { color: labelColor },
|
|
285
|
+
},
|
|
286
|
+
]
|
|
287
|
+
: []),
|
|
284
288
|
{
|
|
285
289
|
label: t('menu.profile'),
|
|
286
290
|
icon: <ProfileIcon color={iconColor} />,
|
|
@@ -329,6 +333,7 @@ export const HeaderRoomListMenu: FC<HeaderRoomListMenuProps> = ({
|
|
|
329
333
|
iconColor,
|
|
330
334
|
labelColor,
|
|
331
335
|
config?.disablePublicChatsDirectory,
|
|
336
|
+
config?.chatHeaderSettings?.disableCreate,
|
|
332
337
|
t,
|
|
333
338
|
]);
|
|
334
339
|
|
|
@@ -407,12 +407,23 @@ const Message: React.FC<MessageProps> = ({ message, isUser, isReply }) => {
|
|
|
407
407
|
|
|
408
408
|
const handleReactionMessage = (emoji: string) => {
|
|
409
409
|
if (!reactionsEnabled(config) || config?.disableInteractions) {return;}
|
|
410
|
-
const sender = { firstName: user.firstName, lastName: user.lastName };
|
|
411
410
|
const own = message.reaction?.[user.xmppUsername || '']?.emoji || [];
|
|
412
|
-
const
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
411
|
+
const adding = !own.includes(emoji);
|
|
412
|
+
const next = adding ? [...own, emoji] : own.filter((reaction) => reaction !== emoji);
|
|
413
|
+
// The author gets a push about an added emoji (see sendMessageReaction);
|
|
414
|
+
// nothing for a removed one or for one's own message.
|
|
415
|
+
const author = message.user?.id || '';
|
|
416
|
+
client?.sendMessageReactionStanza(message.id, message.roomJid, next, {
|
|
417
|
+
firstName: user.firstName,
|
|
418
|
+
lastName: user.lastName,
|
|
419
|
+
photoURL: user.profileImage,
|
|
420
|
+
push: adding && !!author && author !== user.xmppUsername,
|
|
421
|
+
messageAuthor: author,
|
|
422
|
+
messageText: message.body,
|
|
423
|
+
isMediafile: message.isMediafile,
|
|
424
|
+
mimetype: message.mimetype,
|
|
425
|
+
fileName: message.originalName || message.fileName,
|
|
426
|
+
});
|
|
416
427
|
};
|
|
417
428
|
|
|
418
429
|
// Long-press → capture the bubble's on-screen bounding box. The actual
|