@ethora/chat-component-rn 26.10.2 → 26.10.4
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/lib/commonjs/components/Header/HeaderRoomList.js +72 -69
- package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js +13 -11
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js +10 -2
- package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomList.js +8 -18
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +17 -14
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +131 -17
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +6 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/ActiveCallBar.js +203 -0
- package/lib/commonjs/components/VideoCalls/ActiveCallBar.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/CallButtons.js +3 -1
- package/lib/commonjs/components/VideoCalls/CallButtons.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js +123 -129
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js +212 -414
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/callActions.js +61 -0
- package/lib/commonjs/components/VideoCalls/callActions.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/callSessionController.js +461 -0
- package/lib/commonjs/components/VideoCalls/callSessionController.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/callUiStore.js +91 -0
- package/lib/commonjs/components/VideoCalls/callUiStore.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/livekitRuntime.js +1 -0
- package/lib/commonjs/components/VideoCalls/livekitRuntime.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/useDraggable.js +59 -0
- package/lib/commonjs/components/VideoCalls/useDraggable.js.map +1 -0
- package/lib/commonjs/helpers/createRoomFromApi.js +4 -0
- package/lib/commonjs/helpers/createRoomFromApi.js.map +1 -1
- package/lib/commonjs/helpers/incomingCallFromPush.js +1 -1
- package/lib/commonjs/helpers/incomingCallFromPush.js.map +1 -1
- package/lib/commonjs/helpers/roomUserCount.js +7 -1
- package/lib/commonjs/helpers/roomUserCount.js.map +1 -1
- package/lib/commonjs/helpers/uniqueMembers.js +36 -0
- package/lib/commonjs/helpers/uniqueMembers.js.map +1 -0
- package/lib/commonjs/hooks/useLeaveRoom.js +52 -0
- package/lib/commonjs/hooks/useLeaveRoom.js.map +1 -0
- package/lib/commonjs/i18n/strings.js +24 -0
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +36 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/callTokenStanza.js +47 -3
- package/lib/commonjs/networking/callTokenStanza.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js +9 -2
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/components/Header/HeaderRoomList.js +73 -70
- package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/module/components/MainComponents/ChatHeader.js +15 -13
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/MessageContainer.js +10 -2
- package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/module/components/MainComponents/RoomList.js +8 -18
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +18 -15
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +132 -18
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js +6 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/module/components/VideoCalls/ActiveCallBar.js +195 -0
- package/lib/module/components/VideoCalls/ActiveCallBar.js.map +1 -0
- package/lib/module/components/VideoCalls/CallButtons.js +3 -1
- package/lib/module/components/VideoCalls/CallButtons.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallOverlay.js +125 -131
- package/lib/module/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallSession.js +213 -417
- package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/module/components/VideoCalls/callActions.js +55 -0
- package/lib/module/components/VideoCalls/callActions.js.map +1 -0
- package/lib/module/components/VideoCalls/callSessionController.js +450 -0
- package/lib/module/components/VideoCalls/callSessionController.js.map +1 -0
- package/lib/module/components/VideoCalls/callUiStore.js +84 -0
- package/lib/module/components/VideoCalls/callUiStore.js.map +1 -0
- package/lib/module/components/VideoCalls/livekitRuntime.js +1 -0
- package/lib/module/components/VideoCalls/livekitRuntime.js.map +1 -1
- package/lib/module/components/VideoCalls/useDraggable.js +55 -0
- package/lib/module/components/VideoCalls/useDraggable.js.map +1 -0
- package/lib/module/helpers/createRoomFromApi.js +4 -0
- package/lib/module/helpers/createRoomFromApi.js.map +1 -1
- package/lib/module/helpers/incomingCallFromPush.js +1 -1
- package/lib/module/helpers/incomingCallFromPush.js.map +1 -1
- package/lib/module/helpers/roomUserCount.js +7 -1
- package/lib/module/helpers/roomUserCount.js.map +1 -1
- package/lib/module/helpers/uniqueMembers.js +31 -0
- package/lib/module/helpers/uniqueMembers.js.map +1 -0
- package/lib/module/hooks/useLeaveRoom.js +48 -0
- package/lib/module/hooks/useLeaveRoom.js.map +1 -0
- package/lib/module/i18n/strings.js +24 -0
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +35 -1
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/callTokenStanza.js +47 -3
- package/lib/module/networking/callTokenStanza.js.map +1 -1
- package/lib/module/networking/xmppClient.js +8 -1
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts +21 -0
- package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/CallButtons.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/VideoCallOverlay.d.ts +0 -6
- package/lib/typescript/components/VideoCalls/VideoCallOverlay.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts +15 -22
- package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/callActions.d.ts +15 -0
- package/lib/typescript/components/VideoCalls/callActions.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/callSessionController.d.ts +63 -0
- package/lib/typescript/components/VideoCalls/callSessionController.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/callUiStore.d.ts +24 -0
- package/lib/typescript/components/VideoCalls/callUiStore.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/livekitRuntime.d.ts +2 -0
- package/lib/typescript/components/VideoCalls/livekitRuntime.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/useDraggable.d.ts +19 -0
- package/lib/typescript/components/VideoCalls/useDraggable.d.ts.map +1 -0
- package/lib/typescript/helpers/createRoomFromApi.d.ts.map +1 -1
- package/lib/typescript/helpers/roomUserCount.d.ts +1 -0
- package/lib/typescript/helpers/roomUserCount.d.ts.map +1 -1
- package/lib/typescript/helpers/uniqueMembers.d.ts +11 -0
- package/lib/typescript/helpers/uniqueMembers.d.ts.map +1 -0
- package/lib/typescript/hooks/useLeaveRoom.d.ts +9 -0
- package/lib/typescript/hooks/useLeaveRoom.d.ts.map +1 -0
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts +8 -0
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/networking/callTokenStanza.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Header/HeaderRoomList.tsx +66 -61
- package/src/components/MainComponents/ChatHeader.tsx +13 -8
- package/src/components/MainComponents/MessageContainer.tsx +14 -1
- package/src/components/MainComponents/RoomList.tsx +8 -14
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +16 -13
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +167 -36
- package/src/components/RoomComponents/ChatRoomItem.tsx +8 -1
- package/src/components/VideoCalls/ActiveCallBar.tsx +176 -0
- package/src/components/VideoCalls/CallButtons.tsx +5 -1
- package/src/components/VideoCalls/VideoCallOverlay.tsx +153 -183
- package/src/components/VideoCalls/VideoCallSession.tsx +227 -439
- package/src/components/VideoCalls/callActions.ts +63 -0
- package/src/components/VideoCalls/callSessionController.ts +439 -0
- package/src/components/VideoCalls/callUiStore.ts +76 -0
- package/src/components/VideoCalls/livekitRuntime.ts +3 -0
- package/src/components/VideoCalls/useDraggable.ts +46 -0
- package/src/helpers/createRoomFromApi.tsx +2 -0
- package/src/helpers/incomingCallFromPush.ts +2 -2
- package/src/helpers/roomUserCount.ts +6 -2
- package/src/helpers/uniqueMembers.ts +26 -0
- package/src/hooks/useLeaveRoom.ts +42 -0
- package/src/i18n/strings.ts +24 -0
- package/src/networking/api-requests/rooms.api.ts +28 -1
- package/src/networking/callTokenStanza.ts +46 -6
- package/src/networking/xmppClient.ts +10 -1
- package/src/version.ts +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useSyncExternalStore } from 'react';
|
|
4
|
+
import { store } from '../../roomStore';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* UI state of the call shared between the overlay and the header bar:
|
|
8
|
+
* whether the call is minimized, and which header (if any) currently hosts
|
|
9
|
+
* the minimized bar.
|
|
10
|
+
*
|
|
11
|
+
* Minimized, the call is a strip under the visible header (ChatHeader or
|
|
12
|
+
* HeaderRoomList), Telegram-style, instead of a floating panel. Each header
|
|
13
|
+
* registers itself while mounted; the most recently mounted one shows the
|
|
14
|
+
* strip (on an iPad split view both are mounted, and only one strip should
|
|
15
|
+
* appear). With no header mounted (the user is on a host-app screen) the
|
|
16
|
+
* overlay docks the same strip to the top of the screen.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
let state = {
|
|
20
|
+
minimized: false,
|
|
21
|
+
barHost: null
|
|
22
|
+
};
|
|
23
|
+
const hosts = [];
|
|
24
|
+
let nextHostId = 1;
|
|
25
|
+
const listeners = new Set();
|
|
26
|
+
let storeUnsubscribe = null;
|
|
27
|
+
const emit = patch => {
|
|
28
|
+
state = {
|
|
29
|
+
...state,
|
|
30
|
+
...patch
|
|
31
|
+
};
|
|
32
|
+
listeners.forEach(listener => listener());
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// The next call always opens full-screen.
|
|
36
|
+
const ensureStoreWatcher = () => {
|
|
37
|
+
if (storeUnsubscribe) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
storeUnsubscribe = store.subscribe(() => {
|
|
41
|
+
if (state.minimized && store.getState().call.phase === 'idle') {
|
|
42
|
+
emit({
|
|
43
|
+
minimized: false
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
const subscribe = listener => {
|
|
49
|
+
ensureStoreWatcher();
|
|
50
|
+
listeners.add(listener);
|
|
51
|
+
return () => {
|
|
52
|
+
listeners.delete(listener);
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
const getSnapshot = () => state;
|
|
56
|
+
|
|
57
|
+
/** Current state, for non-React code and tests. */
|
|
58
|
+
export const getCallUiState = () => state;
|
|
59
|
+
export const useCallUi = () => useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
60
|
+
export const setCallMinimized = minimized => {
|
|
61
|
+
if (state.minimized !== minimized) {
|
|
62
|
+
emit({
|
|
63
|
+
minimized
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export const registerCallBarHost = onId => {
|
|
68
|
+
const id = nextHostId++;
|
|
69
|
+
hosts.push(id);
|
|
70
|
+
onId?.(id);
|
|
71
|
+
emit({
|
|
72
|
+
barHost: id
|
|
73
|
+
});
|
|
74
|
+
return () => {
|
|
75
|
+
const index = hosts.indexOf(id);
|
|
76
|
+
if (index >= 0) {
|
|
77
|
+
hosts.splice(index, 1);
|
|
78
|
+
}
|
|
79
|
+
emit({
|
|
80
|
+
barHost: hosts.length ? hosts[hosts.length - 1] : null
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=callUiStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useSyncExternalStore","store","state","minimized","barHost","hosts","nextHostId","listeners","Set","storeUnsubscribe","emit","patch","forEach","listener","ensureStoreWatcher","subscribe","getState","call","phase","add","delete","getSnapshot","getCallUiState","useCallUi","setCallMinimized","registerCallBarHost","onId","id","push","index","indexOf","splice","length"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/callUiStore.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,OAAO;AAC5C,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,IAAIC,KAAkB,GAAG;EAAEC,SAAS,EAAE,KAAK;EAAEC,OAAO,EAAE;AAAK,CAAC;AAC5D,MAAMC,KAAe,GAAG,EAAE;AAC1B,IAAIC,UAAU,GAAG,CAAC;AAClB,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,IAAIC,gBAAqC,GAAG,IAAI;AAEhD,MAAMC,IAAI,GAAIC,KAA2B,IAAK;EAC5CT,KAAK,GAAG;IAAE,GAAGA,KAAK;IAAE,GAAGS;EAAM,CAAC;EAC9BJ,SAAS,CAACK,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAAC,CAAC,CAAC;AAC7C,CAAC;;AAED;AACA,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EAC/B,IAAIL,gBAAgB,EAAE;IAAC;EAAO;EAC9BA,gBAAgB,GAAGR,KAAK,CAACc,SAAS,CAAC,MAAM;IACvC,IAAIb,KAAK,CAACC,SAAS,IAAIF,KAAK,CAACe,QAAQ,CAAC,CAAC,CAACC,IAAI,CAACC,KAAK,KAAK,MAAM,EAAE;MAC7DR,IAAI,CAAC;QAAEP,SAAS,EAAE;MAAM,CAAC,CAAC;IAC5B;EACF,CAAC,CAAC;AACJ,CAAC;AAED,MAAMY,SAAS,GAAIF,QAAoB,IAAK;EAC1CC,kBAAkB,CAAC,CAAC;EACpBP,SAAS,CAACY,GAAG,CAACN,QAAQ,CAAC;EACvB,OAAO,MAAM;IACXN,SAAS,CAACa,MAAM,CAACP,QAAQ,CAAC;EAC5B,CAAC;AACH,CAAC;AAED,MAAMQ,WAAW,GAAGA,CAAA,KAAMnB,KAAK;;AAE/B;AACA,OAAO,MAAMoB,cAAc,GAAGA,CAAA,KAAmBpB,KAAK;AAEtD,OAAO,MAAMqB,SAAS,GAAGA,CAAA,KACvBvB,oBAAoB,CAACe,SAAS,EAAEM,WAAW,EAAEA,WAAW,CAAC;AAE3D,OAAO,MAAMG,gBAAgB,GAAIrB,SAAkB,IAAW;EAC5D,IAAID,KAAK,CAACC,SAAS,KAAKA,SAAS,EAAE;IAACO,IAAI,CAAC;MAAEP;IAAU,CAAC,CAAC;EAAC;AAC1D,CAAC;AAED,OAAO,MAAMsB,mBAAmB,GAC9BC,IAA2B,IACV;EACjB,MAAMC,EAAE,GAAGrB,UAAU,EAAE;EACvBD,KAAK,CAACuB,IAAI,CAACD,EAAE,CAAC;EACdD,IAAI,GAAGC,EAAE,CAAC;EACVjB,IAAI,CAAC;IAAEN,OAAO,EAAEuB;EAAG,CAAC,CAAC;EACrB,OAAO,MAAM;IACX,MAAME,KAAK,GAAGxB,KAAK,CAACyB,OAAO,CAACH,EAAE,CAAC;IAC/B,IAAIE,KAAK,IAAI,CAAC,EAAE;MAACxB,KAAK,CAAC0B,MAAM,CAACF,KAAK,EAAE,CAAC,CAAC;IAAC;IACxCnB,IAAI,CAAC;MAAEN,OAAO,EAAEC,KAAK,CAAC2B,MAAM,GAAG3B,KAAK,CAACA,KAAK,CAAC2B,MAAM,GAAG,CAAC,CAAC,GAAG;IAAK,CAAC,CAAC;EAClE,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -45,6 +45,7 @@ export const loadLiveKit = () => {
|
|
|
45
45
|
RoomEvent: core.RoomEvent,
|
|
46
46
|
Track: core.Track,
|
|
47
47
|
ConnectionState: core.ConnectionState,
|
|
48
|
+
VideoPresets: core.VideoPresets,
|
|
48
49
|
VideoTrack: rn.VideoTrack,
|
|
49
50
|
AudioSession: rn.AudioSession,
|
|
50
51
|
registerGlobals: rn.registerGlobals
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cached","isLiveKitAvailable","loadLiveKit","undefined","rn","require","core","Room","RoomEvent","Track","ConnectionState","VideoTrack","AudioSession","registerGlobals","globalsRegistered","ensureLiveKitGlobals","runtime","__resetLiveKitRuntimeForTests"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/livekitRuntime.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["cached","isLiveKitAvailable","loadLiveKit","undefined","rn","require","core","Room","RoomEvent","Track","ConnectionState","VideoPresets","VideoTrack","AudioSession","registerGlobals","globalsRegistered","ensureLiveKitGlobals","runtime","__resetLiveKitRuntimeForTests"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/livekitRuntime.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA,IAAIA,MAAyC;AAE7C,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAeC,WAAW,CAAC,CAAC,KAAK,IAAI;;AAEvE;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,WAAW,GAAGA,CAAA,KAA6B;EACtD,IAAIF,MAAM,KAAKG,SAAS,EAAE;IACxB,OAAOH,MAAM;EACf;EAEA,IAAI;IACF;IACA,MAAMI,EAAE,GAAGC,OAAO,CAAC,uBAAuB,CAAC;IAC3C;IACA;IACA;IACA;IACA;IACA,MAAMC,IAAI,GAAGD,OAAO,CAAC,gBAAgB,CAAC;IAEtCL,MAAM,GAAG;MACPO,IAAI,EAAED,IAAI,CAACC,IAAI;MACfC,SAAS,EAAEF,IAAI,CAACE,SAAS;MACzBC,KAAK,EAAEH,IAAI,CAACG,KAAK;MACjBC,eAAe,EAAEJ,IAAI,CAACI,eAAe;MACrCC,YAAY,EAAEL,IAAI,CAACK,YAAY;MAC/BC,UAAU,EAAER,EAAE,CAACQ,UAAU;MACzBC,YAAY,EAAET,EAAE,CAACS,YAAY;MAC7BC,eAAe,EAAEV,EAAE,CAACU;IACtB,CAAC;EACH,CAAC,CAAC,MAAM;IACNd,MAAM,GAAG,IAAI;EACf;EAEA,OAAOA,MAAM;AACf,CAAC;AAED,IAAIe,iBAAiB,GAAG,KAAK;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAIC,OAAuB,IAAW;EACrE,IAAIF,iBAAiB,EAAE;IAAC;EAAO;EAC/B,IAAI;IACFE,OAAO,CAACH,eAAe,GAAG,CAAC;EAC7B,CAAC,CAAC,MAAM;IACN;EAAA;EAEFC,iBAAiB,GAAG,IAAI;AAC1B,CAAC;;AAED;AACA,OAAO,MAAMG,6BAA6B,GAAGA,CAAA,KAAY;EACvDlB,MAAM,GAAGG,SAAS;EAClBY,iBAAiB,GAAG,KAAK;AAC3B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useMemo, useRef } from 'react';
|
|
4
|
+
import { Animated, PanResponder } from 'react-native';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Drag a floating element around (web's useDraggable, for the self-view
|
|
8
|
+
* tile and the minimized call panel). The offset is kept between drags.
|
|
9
|
+
*
|
|
10
|
+
* The responder only claims the gesture once the finger actually moves a
|
|
11
|
+
* few points, so taps still reach the buttons inside the dragged element.
|
|
12
|
+
*/
|
|
13
|
+
export const useDraggable = () => {
|
|
14
|
+
const position = useRef(new Animated.ValueXY({
|
|
15
|
+
x: 0,
|
|
16
|
+
y: 0
|
|
17
|
+
})).current;
|
|
18
|
+
const offset = useRef({
|
|
19
|
+
x: 0,
|
|
20
|
+
y: 0
|
|
21
|
+
});
|
|
22
|
+
const panHandlers = useMemo(() => PanResponder.create({
|
|
23
|
+
onMoveShouldSetPanResponder: (_event, gesture) => Math.abs(gesture.dx) > 4 || Math.abs(gesture.dy) > 4,
|
|
24
|
+
onPanResponderGrant: () => {
|
|
25
|
+
position.setOffset(offset.current);
|
|
26
|
+
position.setValue({
|
|
27
|
+
x: 0,
|
|
28
|
+
y: 0
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
onPanResponderMove: Animated.event([null, {
|
|
32
|
+
dx: position.x,
|
|
33
|
+
dy: position.y
|
|
34
|
+
}], {
|
|
35
|
+
useNativeDriver: false
|
|
36
|
+
}),
|
|
37
|
+
onPanResponderRelease: (_event, gesture) => {
|
|
38
|
+
offset.current = {
|
|
39
|
+
x: offset.current.x + gesture.dx,
|
|
40
|
+
y: offset.current.y + gesture.dy
|
|
41
|
+
};
|
|
42
|
+
position.flattenOffset();
|
|
43
|
+
},
|
|
44
|
+
onPanResponderTerminate: () => {
|
|
45
|
+
position.flattenOffset();
|
|
46
|
+
}
|
|
47
|
+
}).panHandlers, [position]);
|
|
48
|
+
return {
|
|
49
|
+
panHandlers,
|
|
50
|
+
style: {
|
|
51
|
+
transform: position.getTranslateTransform()
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=useDraggable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMemo","useRef","Animated","PanResponder","useDraggable","position","ValueXY","x","y","current","offset","panHandlers","create","onMoveShouldSetPanResponder","_event","gesture","Math","abs","dx","dy","onPanResponderGrant","setOffset","setValue","onPanResponderMove","event","useNativeDriver","onPanResponderRelease","flattenOffset","onPanResponderTerminate","style","transform","getTranslateTransform"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/useDraggable.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,MAAM,QAAQ,OAAO;AACvC,SAASC,QAAQ,EAAEC,YAAY,QAAQ,cAAc;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAGA,CAAA,KAAM;EAChC,MAAMC,QAAQ,GAAGJ,MAAM,CAAC,IAAIC,QAAQ,CAACI,OAAO,CAAC;IAAEC,CAAC,EAAE,CAAC;IAAEC,CAAC,EAAE;EAAE,CAAC,CAAC,CAAC,CAACC,OAAO;EACrE,MAAMC,MAAM,GAAGT,MAAM,CAAC;IAAEM,CAAC,EAAE,CAAC;IAAEC,CAAC,EAAE;EAAE,CAAC,CAAC;EAErC,MAAMG,WAAW,GAAGX,OAAO,CACzB,MACEG,YAAY,CAACS,MAAM,CAAC;IAClBC,2BAA2B,EAAEA,CAACC,MAAM,EAAEC,OAAO,KAC3CC,IAAI,CAACC,GAAG,CAACF,OAAO,CAACG,EAAE,CAAC,GAAG,CAAC,IAAIF,IAAI,CAACC,GAAG,CAACF,OAAO,CAACI,EAAE,CAAC,GAAG,CAAC;IACtDC,mBAAmB,EAAEA,CAAA,KAAM;MACzBf,QAAQ,CAACgB,SAAS,CAACX,MAAM,CAACD,OAAO,CAAC;MAClCJ,QAAQ,CAACiB,QAAQ,CAAC;QAAEf,CAAC,EAAE,CAAC;QAAEC,CAAC,EAAE;MAAE,CAAC,CAAC;IACnC,CAAC;IACDe,kBAAkB,EAAErB,QAAQ,CAACsB,KAAK,CAChC,CAAC,IAAI,EAAE;MAAEN,EAAE,EAAEb,QAAQ,CAACE,CAAC;MAAEY,EAAE,EAAEd,QAAQ,CAACG;IAAE,CAAC,CAAC,EAC1C;MAAEiB,eAAe,EAAE;IAAM,CAC3B,CAAC;IACDC,qBAAqB,EAAEA,CAACZ,MAAM,EAAEC,OAAO,KAAK;MAC1CL,MAAM,CAACD,OAAO,GAAG;QACfF,CAAC,EAAEG,MAAM,CAACD,OAAO,CAACF,CAAC,GAAGQ,OAAO,CAACG,EAAE;QAChCV,CAAC,EAAEE,MAAM,CAACD,OAAO,CAACD,CAAC,GAAGO,OAAO,CAACI;MAChC,CAAC;MACDd,QAAQ,CAACsB,aAAa,CAAC,CAAC;IAC1B,CAAC;IACDC,uBAAuB,EAAEA,CAAA,KAAM;MAC7BvB,QAAQ,CAACsB,aAAa,CAAC,CAAC;IAC1B;EACF,CAAC,CAAC,CAAChB,WAAW,EAChB,CAACN,QAAQ,CACX,CAAC;EAED,OAAO;IACLM,WAAW;IACXkB,KAAK,EAAE;MAAEC,SAAS,EAAEzB,QAAQ,CAAC0B,qBAAqB,CAAC;IAAE;EACvD,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { uniqueMembers } from './uniqueMembers';
|
|
3
4
|
/**
|
|
4
5
|
* Maps the flattened `lastMessage` doc `GET /v1/chats/my` embeds per room
|
|
5
6
|
* into the shape a live message already takes. Backends differ in whether
|
|
@@ -68,6 +69,9 @@ export const createRoomFromApi = (room, service = 'conference.dev.xmpp.ethoradev
|
|
|
68
69
|
const lastMessage = mapApiLastMessage(room?.lastMessage, jid);
|
|
69
70
|
const roomData = {
|
|
70
71
|
...room,
|
|
72
|
+
...(Array.isArray(room?.members) ? {
|
|
73
|
+
members: uniqueMembers(room.members)
|
|
74
|
+
} : {}),
|
|
71
75
|
id: room?._id || '',
|
|
72
76
|
jid,
|
|
73
77
|
name: room?.title || '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mapApiLastMessage","apiLastMessage","roomJid","body","String","trim","undefined","senderName","senderFirstName","senderLastName","id","messageId","stanzaId","xmppId","date","createdAt","isDeleted","user","fromUserId","from","name","readApiUnreadCount","item","raw","unreadCount","Number","isFinite","Math","max","floor","readApiUsersCnt","fallback","membersLen","Array","isArray","members","length","total","usersCnt","participants","seedTimestamp","seed","ms","Date","getTime","NaN","createRoomFromApi","room","service","usersArrayLength","jid","apiUnreadCount","lastMessage","roomData","_id","title","messages","isLoading","roomBg","icon","picture","unreadMessages","apiUnreadSeededAt","now","lastViewedTimestamp","lastMessageTimestamp","error","console","log"],"sourceRoot":"../../../src","sources":["helpers/createRoomFromApi.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["uniqueMembers","mapApiLastMessage","apiLastMessage","roomJid","body","String","trim","undefined","senderName","senderFirstName","senderLastName","id","messageId","stanzaId","xmppId","date","createdAt","isDeleted","user","fromUserId","from","name","readApiUnreadCount","item","raw","unreadCount","Number","isFinite","Math","max","floor","readApiUsersCnt","fallback","membersLen","Array","isArray","members","length","total","usersCnt","participants","seedTimestamp","seed","ms","Date","getTime","NaN","createRoomFromApi","room","service","usersArrayLength","jid","apiUnreadCount","lastMessage","roomData","_id","title","messages","isLoading","roomBg","icon","picture","unreadMessages","apiUnreadSeededAt","now","lastViewedTimestamp","lastMessageTimestamp","error","console","log"],"sourceRoot":"../../../src","sources":["helpers/createRoomFromApi.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -58,7 +58,7 @@ export const handleCallPush = data => {
|
|
|
58
58
|
}
|
|
59
59
|
store.dispatch(setIncomingCallToken({
|
|
60
60
|
roomJid,
|
|
61
|
-
roomName: parsed.callerName || resolved?.name || null,
|
|
61
|
+
roomName: parsed.callerName || resolved?.title || resolved?.name || null,
|
|
62
62
|
roomBareName: parsed.roomBareName,
|
|
63
63
|
token: parsed.token,
|
|
64
64
|
kind: parsed.kind,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["store","setIncomingCallToken","isCallPush","parseCallPush","handleCallPush","data","parsed","state","getState","chatSettingStore","config","videoCalls","enabled","current","call","phase","sameCall","callId","roomBareName","token","rooms","resolved","Object","values","find","room","jid","split","roomRef","roomJid","includes","dispatch","roomName","callerName","name","kind","peerXmppUsername","callerXmppUsername"],"sourceRoot":"../../../src","sources":["helpers/incomingCallFromPush.ts"],"mappings":";;AAAA,SAASA,KAAK,QAAQ,cAAc;AACpC,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,UAAU,EAAEC,aAAa,QAAQ,YAAY;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GACzBC,IAA4C,IAChC;EACZ,IAAI,CAACH,UAAU,CAACG,IAAI,CAAC,EAAE;IACrB,OAAO,KAAK;EACd;EAEA,MAAMC,MAAM,GAAGH,aAAa,CAACE,IAAI,CAAC;EAClC,MAAME,KAAK,GAAGP,KAAK,CAACQ,QAAQ,CAAC,CAAC;;EAE9B;EACA;EACA,IAAID,KAAK,CAACE,gBAAgB,CAACC,MAAM,EAAEC,UAAU,EAAEC,OAAO,KAAK,IAAI,EAAE;IAC/D,OAAO,IAAI;EACb;;EAEA;EACA;EACA;EACA,MAAMC,OAAO,GAAGN,KAAK,CAACO,IAAI;EAC1B,IAAID,OAAO,CAACE,KAAK,KAAK,MAAM,EAAE;IAC5B,MAAMC,QAAQ,GACX,CAAC,CAACV,MAAM,CAACW,MAAM,IAAIX,MAAM,CAACW,MAAM,KAAKJ,OAAO,CAACI,MAAM,IACnD,CAAC,CAACX,MAAM,CAACY,YAAY,IAAIZ,MAAM,CAACY,YAAY,KAAKL,OAAO,CAACK,YAAa;IACzE,IAAIF,QAAQ,IAAIH,OAAO,CAACE,KAAK,KAAK,SAAS,EAAE;MAC3C,OAAO,IAAI;IACb;EACF;;EAEA;EACA;EACA;EACA;EACA,IAAI,CAACT,MAAM,CAACa,KAAK,EAAE;IACjB,OAAO,IAAI;EACb;;EAEA;EACA;EACA,MAAMC,KAAK,GAAGb,KAAK,CAACa,KAAK,CAACA,KAAK,IAAI,CAAC,CAAC;EACrC,MAAMC,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAACH,KAAK,CAAC,CAACI,IAAI,CACvCC,IAAS,IACR,CAACA,IAAI,EAAEC,GAAG,IAAI,EAAE,EAAEC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAKrB,MAAM,CAACY,YAAY,IACvDO,IAAI,EAAEC,GAAG,KAAKpB,MAAM,CAACsB,OACzB,
|
|
1
|
+
{"version":3,"names":["store","setIncomingCallToken","isCallPush","parseCallPush","handleCallPush","data","parsed","state","getState","chatSettingStore","config","videoCalls","enabled","current","call","phase","sameCall","callId","roomBareName","token","rooms","resolved","Object","values","find","room","jid","split","roomRef","roomJid","includes","dispatch","roomName","callerName","title","name","kind","peerXmppUsername","callerXmppUsername"],"sourceRoot":"../../../src","sources":["helpers/incomingCallFromPush.ts"],"mappings":";;AAAA,SAASA,KAAK,QAAQ,cAAc;AACpC,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,UAAU,EAAEC,aAAa,QAAQ,YAAY;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GACzBC,IAA4C,IAChC;EACZ,IAAI,CAACH,UAAU,CAACG,IAAI,CAAC,EAAE;IACrB,OAAO,KAAK;EACd;EAEA,MAAMC,MAAM,GAAGH,aAAa,CAACE,IAAI,CAAC;EAClC,MAAME,KAAK,GAAGP,KAAK,CAACQ,QAAQ,CAAC,CAAC;;EAE9B;EACA;EACA,IAAID,KAAK,CAACE,gBAAgB,CAACC,MAAM,EAAEC,UAAU,EAAEC,OAAO,KAAK,IAAI,EAAE;IAC/D,OAAO,IAAI;EACb;;EAEA;EACA;EACA;EACA,MAAMC,OAAO,GAAGN,KAAK,CAACO,IAAI;EAC1B,IAAID,OAAO,CAACE,KAAK,KAAK,MAAM,EAAE;IAC5B,MAAMC,QAAQ,GACX,CAAC,CAACV,MAAM,CAACW,MAAM,IAAIX,MAAM,CAACW,MAAM,KAAKJ,OAAO,CAACI,MAAM,IACnD,CAAC,CAACX,MAAM,CAACY,YAAY,IAAIZ,MAAM,CAACY,YAAY,KAAKL,OAAO,CAACK,YAAa;IACzE,IAAIF,QAAQ,IAAIH,OAAO,CAACE,KAAK,KAAK,SAAS,EAAE;MAC3C,OAAO,IAAI;IACb;EACF;;EAEA;EACA;EACA;EACA;EACA,IAAI,CAACT,MAAM,CAACa,KAAK,EAAE;IACjB,OAAO,IAAI;EACb;;EAEA;EACA;EACA,MAAMC,KAAK,GAAGb,KAAK,CAACa,KAAK,CAACA,KAAK,IAAI,CAAC,CAAC;EACrC,MAAMC,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAACH,KAAK,CAAC,CAACI,IAAI,CACvCC,IAAS,IACR,CAACA,IAAI,EAAEC,GAAG,IAAI,EAAE,EAAEC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAKrB,MAAM,CAACY,YAAY,IACvDO,IAAI,EAAEC,GAAG,KAAKpB,MAAM,CAACsB,OACzB,CAAgE;EAEhE,MAAMC,OAAO,GACXR,QAAQ,EAAEK,GAAG,KACZpB,MAAM,CAACsB,OAAO,IAAItB,MAAM,CAACsB,OAAO,CAACE,QAAQ,CAAC,GAAG,CAAC,GAAGxB,MAAM,CAACsB,OAAO,GAAG,EAAE,CAAC;EACxE,IAAI,CAACC,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EAEA7B,KAAK,CAAC+B,QAAQ,CACZ9B,oBAAoB,CAAC;IACnB4B,OAAO;IACPG,QAAQ,EAAE1B,MAAM,CAAC2B,UAAU,IAAIZ,QAAQ,EAAEa,KAAK,IAAIb,QAAQ,EAAEc,IAAI,IAAI,IAAI;IACxEjB,YAAY,EAAEZ,MAAM,CAACY,YAAY;IACjCC,KAAK,EAAEb,MAAM,CAACa,KAAK;IACnBiB,IAAI,EAAE9B,MAAM,CAAC8B,IAAI;IACjBnB,MAAM,EAAEX,MAAM,CAACW,MAAM;IACrBoB,gBAAgB,EAAE/B,MAAM,CAACgC;EAC3B,CAAC,CACH,CAAC;EAED,OAAO,IAAI;AACb,CAAC","ignoreList":[]}
|
|
@@ -8,11 +8,17 @@
|
|
|
8
8
|
export const getRoomUserCount = room => {
|
|
9
9
|
const members = Array.isArray(room?.members) ? room.members.length : 0;
|
|
10
10
|
const cnt = typeof room?.usersCnt === 'number' && Number.isFinite(room.usersCnt) ? room.usersCnt : 0;
|
|
11
|
-
|
|
11
|
+
const total = Math.max(cnt, members);
|
|
12
|
+
// A private chat is two people by definition; the server's usersCnt has
|
|
13
|
+
// been seen to drift above that (3 for a 1:1 room).
|
|
14
|
+
return room?.type === 'private' ? Math.min(total, 2) : total;
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
/** True when the room is known to have more users than members loaded. */
|
|
15
18
|
export const isRoomMembersTruncated = room => {
|
|
19
|
+
if (room?.type === 'private') {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
16
22
|
const members = Array.isArray(room?.members) ? room.members.length : 0;
|
|
17
23
|
const cnt = typeof room?.usersCnt === 'number' && Number.isFinite(room.usersCnt) ? room.usersCnt : 0;
|
|
18
24
|
return cnt > members;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getRoomUserCount","room","members","Array","isArray","length","cnt","usersCnt","Number","isFinite","Math","max","isRoomMembersTruncated","adjustUsersCnt","delta","nextMembersLength","current"],"sourceRoot":"../../../src","sources":["helpers/roomUserCount.ts"],"mappings":";;AAQA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAIC,IAAiB,IAAa;EAC7D,MAAMC,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACH,IAAI,EAAEC,OAAO,CAAC,GAAGD,IAAI,CAACC,OAAO,CAACG,MAAM,GAAG,CAAC;EACtE,MAAMC,GAAG,GACP,OAAOL,IAAI,EAAEM,QAAQ,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACR,IAAI,CAACM,QAAQ,CAAC,GAChEN,IAAI,CAACM,QAAQ,GACb,CAAC;EACP,
|
|
1
|
+
{"version":3,"names":["getRoomUserCount","room","members","Array","isArray","length","cnt","usersCnt","Number","isFinite","total","Math","max","type","min","isRoomMembersTruncated","adjustUsersCnt","delta","nextMembersLength","current"],"sourceRoot":"../../../src","sources":["helpers/roomUserCount.ts"],"mappings":";;AAQA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAIC,IAAiB,IAAa;EAC7D,MAAMC,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACH,IAAI,EAAEC,OAAO,CAAC,GAAGD,IAAI,CAACC,OAAO,CAACG,MAAM,GAAG,CAAC;EACtE,MAAMC,GAAG,GACP,OAAOL,IAAI,EAAEM,QAAQ,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACR,IAAI,CAACM,QAAQ,CAAC,GAChEN,IAAI,CAACM,QAAQ,GACb,CAAC;EACP,MAAMG,KAAK,GAAGC,IAAI,CAACC,GAAG,CAACN,GAAG,EAAEJ,OAAO,CAAC;EACpC;EACA;EACA,OAAQD,IAAI,EAAyBY,IAAI,KAAK,SAAS,GAAGF,IAAI,CAACG,GAAG,CAACJ,KAAK,EAAE,CAAC,CAAC,GAAGA,KAAK;AACtF,CAAC;;AAED;AACA,OAAO,MAAMK,sBAAsB,GAAId,IAAiB,IAAc;EACpE,IAAKA,IAAI,EAAyBY,IAAI,KAAK,SAAS,EAAE;IAAC,OAAO,KAAK;EAAC;EACpE,MAAMX,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACH,IAAI,EAAEC,OAAO,CAAC,GAAGD,IAAI,CAACC,OAAO,CAACG,MAAM,GAAG,CAAC;EACtE,MAAMC,GAAG,GACP,OAAOL,IAAI,EAAEM,QAAQ,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACR,IAAI,CAACM,QAAQ,CAAC,GAChEN,IAAI,CAACM,QAAQ,GACb,CAAC;EACP,OAAOD,GAAG,GAAGJ,OAAO;AACtB,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMc,cAAc,GAAGA,CAC5Bf,IAAiB,EACjBgB,KAAa,EACbC,iBAAyB,KACd;EACX,MAAMC,OAAO,GAAGnB,gBAAgB,CAACC,IAAI,CAAC;EACtC,OAAOU,IAAI,CAACC,GAAG,CAACM,iBAAiB,EAAEC,OAAO,GAAGF,KAAK,EAAE,CAAC,CAAC;AACxD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Drop repeated entries from a room's member list, keeping the first.
|
|
5
|
+
*
|
|
6
|
+
* The same person could appear twice in a 1:1 chat ("Members: 3", four
|
|
7
|
+
* rows): the list came back from the server with repeats after the private
|
|
8
|
+
* chat was requested again for an existing room. Members are keyed by
|
|
9
|
+
* whatever identity the entry carries: xmppUsername, then _id, then the
|
|
10
|
+
* JID's localpart.
|
|
11
|
+
*/
|
|
12
|
+
export const uniqueMembers = members => {
|
|
13
|
+
if (!Array.isArray(members)) {
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
const seen = new Set();
|
|
17
|
+
const out = [];
|
|
18
|
+
for (const member of members) {
|
|
19
|
+
const m = member;
|
|
20
|
+
const key = String(m?.xmppUsername || m?._id || String(m?.jid || '').split('@')[0] || '').trim();
|
|
21
|
+
if (key) {
|
|
22
|
+
if (seen.has(key)) {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
seen.add(key);
|
|
26
|
+
}
|
|
27
|
+
out.push(member);
|
|
28
|
+
}
|
|
29
|
+
return out;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=uniqueMembers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["uniqueMembers","members","Array","isArray","seen","Set","out","member","m","key","String","xmppUsername","_id","jid","split","trim","has","add","push"],"sourceRoot":"../../../src","sources":["helpers/uniqueMembers.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,aAAa,GAAQC,OAA+B,IAAU;EACzE,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,OAAO,CAAC,EAAE;IAAC,OAAO,EAAE;EAAC;EACxC,MAAMG,IAAI,GAAG,IAAIC,GAAG,CAAS,CAAC;EAC9B,MAAMC,GAAQ,GAAG,EAAE;EACnB,KAAK,MAAMC,MAAM,IAAIN,OAAO,EAAE;IAC5B,MAAMO,CAAC,GAAGD,MAAa;IACvB,MAAME,GAAG,GAAGC,MAAM,CAChBF,CAAC,EAAEG,YAAY,IAAIH,CAAC,EAAEI,GAAG,IAAIF,MAAM,CAACF,CAAC,EAAEK,GAAG,IAAI,EAAE,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EACrE,CAAC,CAACC,IAAI,CAAC,CAAC;IACR,IAAIN,GAAG,EAAE;MACP,IAAIL,IAAI,CAACY,GAAG,CAACP,GAAG,CAAC,EAAE;QAAC;MAAS;MAC7BL,IAAI,CAACa,GAAG,CAACR,GAAG,CAAC;IACf;IACAH,GAAG,CAACY,IAAI,CAACX,MAAM,CAAC;EAClB;EACA,OAAOD,GAAG;AACZ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { useDispatch } from 'react-redux';
|
|
5
|
+
import { deleteRoom } from '../roomStore/roomsSlice';
|
|
6
|
+
import { leaveRoom } from '../networking/api-requests/rooms.api';
|
|
7
|
+
import { useXmppClient } from '../context/xmppProvider';
|
|
8
|
+
|
|
9
|
+
/** Rooms with a leave request in flight: a second tap waits for the first. */
|
|
10
|
+
const inFlight = new Set();
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Leave a chat, shared by the room-list swipe, the chat header and the chat
|
|
14
|
+
* profile. The server goes first: if it refuses, the chat stays where it is
|
|
15
|
+
* (dropping it locally would only have it come back on the next /chats/my).
|
|
16
|
+
* Then the unavailable presence to the MUC and the room out of the store.
|
|
17
|
+
* Resolves false on failure, so the caller can say so in its own way.
|
|
18
|
+
*/
|
|
19
|
+
export const useLeaveRoom = () => {
|
|
20
|
+
const dispatch = useDispatch();
|
|
21
|
+
const {
|
|
22
|
+
client
|
|
23
|
+
} = useXmppClient();
|
|
24
|
+
return useCallback(async jid => {
|
|
25
|
+
if (!jid || inFlight.has(jid)) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
inFlight.add(jid);
|
|
29
|
+
try {
|
|
30
|
+
await leaveRoom(jid.split('@')[0]);
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.warn('[ethora-rn] leave failed', error);
|
|
33
|
+
return false;
|
|
34
|
+
} finally {
|
|
35
|
+
inFlight.delete(jid);
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
client?.leaveTheRoomStanza?.(jid);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error('Failed to leave the room:', error);
|
|
41
|
+
}
|
|
42
|
+
dispatch(deleteRoom({
|
|
43
|
+
jid
|
|
44
|
+
}));
|
|
45
|
+
return true;
|
|
46
|
+
}, [client, dispatch]);
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=useLeaveRoom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useDispatch","deleteRoom","leaveRoom","useXmppClient","inFlight","Set","useLeaveRoom","dispatch","client","jid","has","add","split","error","console","warn","delete","leaveTheRoomStanza"],"sourceRoot":"../../../src","sources":["hooks/useLeaveRoom.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,UAAU,QAAQ,yBAAyB;AACpD,SAASC,SAAS,QAAQ,sCAAsC;AAChE,SAASC,aAAa,QAAQ,yBAAyB;;AAEvD;AACA,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAAS,CAAC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAGA,CAAA,KAAM;EAChC,MAAMC,QAAQ,GAAGP,WAAW,CAAC,CAAC;EAC9B,MAAM;IAAEQ;EAAO,CAAC,GAAGL,aAAa,CAAC,CAAC;EAClC,OAAOJ,WAAW,CAChB,MAAOU,GAAW,IAAuB;IACvC,IAAI,CAACA,GAAG,IAAIL,QAAQ,CAACM,GAAG,CAACD,GAAG,CAAC,EAAE;MAAC,OAAO,IAAI;IAAC;IAC5CL,QAAQ,CAACO,GAAG,CAACF,GAAG,CAAC;IACjB,IAAI;MACF,MAAMP,SAAS,CAACO,GAAG,CAACG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC,OAAOC,KAAK,EAAE;MACdC,OAAO,CAACC,IAAI,CAAC,0BAA0B,EAAEF,KAAK,CAAC;MAC/C,OAAO,KAAK;IACd,CAAC,SAAS;MACRT,QAAQ,CAACY,MAAM,CAACP,GAAG,CAAC;IACtB;IACA,IAAI;MACFD,MAAM,EAAES,kBAAkB,GAAGR,GAAG,CAAC;IACnC,CAAC,CAAC,OAAOI,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,2BAA2B,EAAEA,KAAK,CAAC;IACnD;IACAN,QAAQ,CAACN,UAAU,CAAC;MAAEQ;IAAI,CAAC,CAAC,CAAC;IAC7B,OAAO,IAAI;EACb,CAAC,EACD,CAACD,MAAM,EAAED,QAAQ,CACnB,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -115,6 +115,7 @@ const en = {
|
|
|
115
115
|
'call.action.stopCamera': 'Turn camera off',
|
|
116
116
|
'call.action.startCamera': 'Turn camera on',
|
|
117
117
|
'call.action.switchCamera': 'Switch camera',
|
|
118
|
+
'call.action.swapVideo': 'Swap videos',
|
|
118
119
|
'call.action.speakerOn': 'Turn speaker on',
|
|
119
120
|
'call.action.speakerOff': 'Turn speaker off',
|
|
120
121
|
'call.action.startAudioCall': 'Start audio call',
|
|
@@ -128,6 +129,8 @@ const en = {
|
|
|
128
129
|
'call.error.deviceInUse': 'Your camera or microphone is already in use by another app.',
|
|
129
130
|
'call.error.deviceGeneric': 'Could not access your camera or microphone.',
|
|
130
131
|
'call.error.noAnswerTimeout': 'No answer, the call timed out',
|
|
132
|
+
'call.peerMuted': '{name} is muted',
|
|
133
|
+
'call.selfMuted': 'Your microphone is muted',
|
|
131
134
|
'action.send': 'Send',
|
|
132
135
|
'action.cancel': 'Cancel',
|
|
133
136
|
'action.save': 'Save',
|
|
@@ -138,6 +141,7 @@ const en = {
|
|
|
138
141
|
'action.mute': 'Mute',
|
|
139
142
|
'action.unmute': 'Unmute',
|
|
140
143
|
'toast.muteFailed': 'Could not update notifications for this chat',
|
|
144
|
+
'toast.leaveFailed': 'Could not leave this chat',
|
|
141
145
|
'action.create': 'Create',
|
|
142
146
|
'action.submit': 'Submit',
|
|
143
147
|
'action.translate': 'Translate',
|
|
@@ -491,6 +495,7 @@ const fr = {
|
|
|
491
495
|
'call.action.stopCamera': 'Désactiver la caméra',
|
|
492
496
|
'call.action.startCamera': 'Activer la caméra',
|
|
493
497
|
'call.action.switchCamera': 'Changer de caméra',
|
|
498
|
+
'call.action.swapVideo': 'Inverser les vidéos',
|
|
494
499
|
'call.action.speakerOn': 'Activer le haut-parleur',
|
|
495
500
|
'call.action.speakerOff': 'Désactiver le haut-parleur',
|
|
496
501
|
'call.action.startAudioCall': 'Démarrer un appel audio',
|
|
@@ -504,6 +509,8 @@ const fr = {
|
|
|
504
509
|
'call.error.deviceInUse': 'Votre caméra ou microphone est déjà utilisé par une autre application.',
|
|
505
510
|
'call.error.deviceGeneric': 'Impossible d\'accéder à votre caméra ou microphone.',
|
|
506
511
|
'call.error.noAnswerTimeout': 'Pas de réponse, l\'appel a expiré',
|
|
512
|
+
'call.peerMuted': '{name} a coupé son micro',
|
|
513
|
+
'call.selfMuted': 'Votre micro est coupé',
|
|
507
514
|
'action.send': 'Envoyer',
|
|
508
515
|
'action.cancel': 'Annuler',
|
|
509
516
|
'action.save': 'Enregistrer',
|
|
@@ -514,6 +521,7 @@ const fr = {
|
|
|
514
521
|
'action.mute': 'Muet',
|
|
515
522
|
'action.unmute': 'Réactiver',
|
|
516
523
|
'toast.muteFailed': 'Impossible de modifier les notifications de ce chat',
|
|
524
|
+
'toast.leaveFailed': 'Impossible de quitter ce chat',
|
|
517
525
|
'action.create': 'Créer',
|
|
518
526
|
'action.submit': 'Soumettre',
|
|
519
527
|
'action.translate': 'Traduire',
|
|
@@ -867,6 +875,7 @@ const es = {
|
|
|
867
875
|
'call.action.stopCamera': 'Apagar la cámara',
|
|
868
876
|
'call.action.startCamera': 'Encender la cámara',
|
|
869
877
|
'call.action.switchCamera': 'Cambiar de cámara',
|
|
878
|
+
'call.action.swapVideo': 'Intercambiar vídeos',
|
|
870
879
|
'call.action.speakerOn': 'Activar el altavoz',
|
|
871
880
|
'call.action.speakerOff': 'Desactivar el altavoz',
|
|
872
881
|
'call.action.startAudioCall': 'Iniciar llamada de audio',
|
|
@@ -880,6 +889,8 @@ const es = {
|
|
|
880
889
|
'call.error.deviceInUse': 'Tu cámara o micrófono ya está siendo usado por otra aplicación.',
|
|
881
890
|
'call.error.deviceGeneric': 'No se pudo acceder a tu cámara o micrófono.',
|
|
882
891
|
'call.error.noAnswerTimeout': 'Sin respuesta, la llamada expiró',
|
|
892
|
+
'call.peerMuted': '{name} tiene el micrófono silenciado',
|
|
893
|
+
'call.selfMuted': 'Tu micrófono está silenciado',
|
|
883
894
|
'action.send': 'Enviar',
|
|
884
895
|
'action.cancel': 'Cancelar',
|
|
885
896
|
'action.save': 'Guardar',
|
|
@@ -890,6 +901,7 @@ const es = {
|
|
|
890
901
|
'action.mute': 'Silenciar',
|
|
891
902
|
'action.unmute': 'Activar',
|
|
892
903
|
'toast.muteFailed': 'No se pudieron cambiar las notificaciones de este chat',
|
|
904
|
+
'toast.leaveFailed': 'No se pudo salir de este chat',
|
|
893
905
|
'action.create': 'Crear',
|
|
894
906
|
'action.submit': 'Enviar',
|
|
895
907
|
'action.translate': 'Traducir',
|
|
@@ -1243,6 +1255,7 @@ const pt = {
|
|
|
1243
1255
|
'call.action.stopCamera': 'Desligar a câmara',
|
|
1244
1256
|
'call.action.startCamera': 'Ligar a câmara',
|
|
1245
1257
|
'call.action.switchCamera': 'Mudar de câmara',
|
|
1258
|
+
'call.action.swapVideo': 'Trocar vídeos',
|
|
1246
1259
|
'call.action.speakerOn': 'Ligar o altifalante',
|
|
1247
1260
|
'call.action.speakerOff': 'Desligar o altifalante',
|
|
1248
1261
|
'call.action.startAudioCall': 'Iniciar chamada de áudio',
|
|
@@ -1256,6 +1269,8 @@ const pt = {
|
|
|
1256
1269
|
'call.error.deviceInUse': 'A sua câmara ou microfone já está a ser utilizado por outra aplicação.',
|
|
1257
1270
|
'call.error.deviceGeneric': 'Não foi possível aceder à câmara ou microfone.',
|
|
1258
1271
|
'call.error.noAnswerTimeout': 'Sem resposta, a chamada expirou',
|
|
1272
|
+
'call.peerMuted': '{name} está com o microfone desativado',
|
|
1273
|
+
'call.selfMuted': 'Seu microfone está desativado',
|
|
1259
1274
|
'action.send': 'Enviar',
|
|
1260
1275
|
'action.cancel': 'Cancelar',
|
|
1261
1276
|
'action.save': 'Guardar',
|
|
@@ -1266,6 +1281,7 @@ const pt = {
|
|
|
1266
1281
|
'action.mute': 'Silenciar',
|
|
1267
1282
|
'action.unmute': 'Ativar som',
|
|
1268
1283
|
'toast.muteFailed': 'Could not update notifications for this chat',
|
|
1284
|
+
'toast.leaveFailed': 'Não foi possível sair deste chat',
|
|
1269
1285
|
'action.create': 'Criar',
|
|
1270
1286
|
'action.submit': 'Enviar',
|
|
1271
1287
|
'action.translate': 'Traduzir',
|
|
@@ -1619,6 +1635,7 @@ const ht = {
|
|
|
1619
1635
|
'call.action.stopCamera': 'Etenn kamera a',
|
|
1620
1636
|
'call.action.startCamera': 'Limen kamera a',
|
|
1621
1637
|
'call.action.switchCamera': 'Chanje kamera',
|
|
1638
|
+
'call.action.swapVideo': 'Chanje videyo yo',
|
|
1622
1639
|
'call.action.speakerOn': 'Limen opalè a',
|
|
1623
1640
|
'call.action.speakerOff': 'Etenn opalè a',
|
|
1624
1641
|
'call.action.startAudioCall': 'Kòmanse yon apèl odyo',
|
|
@@ -1632,6 +1649,8 @@ const ht = {
|
|
|
1632
1649
|
'call.error.deviceInUse': 'Kamera oswa mikwofòn ou deja ap itilize pa yon lòt app.',
|
|
1633
1650
|
'call.error.deviceGeneric': 'Nou pa t kapab jwenn aksè nan kamera oswa mikwofòn ou.',
|
|
1634
1651
|
'call.error.noAnswerTimeout': 'Pa gen repons, apèl la fini',
|
|
1652
|
+
'call.peerMuted': '{name} koupe mikwo li',
|
|
1653
|
+
'call.selfMuted': 'Mikwo ou koupe',
|
|
1635
1654
|
'action.send': 'Voye',
|
|
1636
1655
|
'action.cancel': 'Anile',
|
|
1637
1656
|
'action.save': 'Anrejistre',
|
|
@@ -1642,6 +1661,7 @@ const ht = {
|
|
|
1642
1661
|
'action.mute': 'Mete an silans',
|
|
1643
1662
|
'action.unmute': 'Retire silans',
|
|
1644
1663
|
'toast.muteFailed': 'Could not update notifications for this chat',
|
|
1664
|
+
'toast.leaveFailed': 'Pa t kapab kite chat sa a',
|
|
1645
1665
|
'action.create': 'Kreye',
|
|
1646
1666
|
'action.submit': 'Soumèt',
|
|
1647
1667
|
'action.translate': 'Tradui',
|
|
@@ -1995,6 +2015,7 @@ const zh = {
|
|
|
1995
2015
|
'call.action.stopCamera': '关闭摄像头',
|
|
1996
2016
|
'call.action.startCamera': '打开摄像头',
|
|
1997
2017
|
'call.action.switchCamera': '切换摄像头',
|
|
2018
|
+
'call.action.swapVideo': '切换画面',
|
|
1998
2019
|
'call.action.speakerOn': '打开扬声器',
|
|
1999
2020
|
'call.action.speakerOff': '关闭扬声器',
|
|
2000
2021
|
'call.action.startAudioCall': '发起语音通话',
|
|
@@ -2008,6 +2029,8 @@ const zh = {
|
|
|
2008
2029
|
'call.error.deviceInUse': '您的摄像头或麦克风正被其他应用占用。',
|
|
2009
2030
|
'call.error.deviceGeneric': '无法访问您的摄像头或麦克风。',
|
|
2010
2031
|
'call.error.noAnswerTimeout': '无人接听,通话已超时',
|
|
2032
|
+
'call.peerMuted': '{name} 已静音',
|
|
2033
|
+
'call.selfMuted': '你的麦克风已静音',
|
|
2011
2034
|
'action.send': '发送',
|
|
2012
2035
|
'action.cancel': '取消',
|
|
2013
2036
|
'action.save': '保存',
|
|
@@ -2018,6 +2041,7 @@ const zh = {
|
|
|
2018
2041
|
'action.mute': '静音',
|
|
2019
2042
|
'action.unmute': '取消静音',
|
|
2020
2043
|
'toast.muteFailed': 'Could not update notifications for this chat',
|
|
2044
|
+
'toast.leaveFailed': '无法退出此聊天',
|
|
2021
2045
|
'action.create': '创建',
|
|
2022
2046
|
'action.submit': '提交',
|
|
2023
2047
|
'action.translate': '翻译',
|