@ethora/chat-component-rn 26.10.2 → 26.10.3
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/MainComponents/ChatHeader.js +11 -10
- 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/CallButtons.js +3 -1
- package/lib/commonjs/components/VideoCalls/CallButtons.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js +123 -111
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js +207 -346
- 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 +431 -0
- package/lib/commonjs/components/VideoCalls/callSessionController.js.map +1 -0
- 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 +18 -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/MainComponents/ChatHeader.js +13 -12
- 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/CallButtons.js +3 -1
- package/lib/module/components/VideoCalls/CallButtons.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallOverlay.js +125 -113
- package/lib/module/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallSession.js +208 -348
- 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 +420 -0
- package/lib/module/components/VideoCalls/callSessionController.js.map +1 -0
- 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 +18 -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/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/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 +9 -20
- 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 +61 -0
- package/lib/typescript/components/VideoCalls/callSessionController.d.ts.map +1 -0
- 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/MainComponents/ChatHeader.tsx +10 -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/CallButtons.tsx +5 -1
- package/src/components/VideoCalls/VideoCallOverlay.tsx +156 -163
- package/src/components/VideoCalls/VideoCallSession.tsx +207 -378
- package/src/components/VideoCalls/callActions.ts +63 -0
- package/src/components/VideoCalls/callSessionController.ts +421 -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 +18 -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
|
@@ -1,37 +1,26 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { VideoCallIcons } from '../../types/types';
|
|
3
3
|
export interface VideoCallSessionProps {
|
|
4
|
-
token: string;
|
|
5
|
-
livekitUrl: string;
|
|
6
4
|
kind?: 'audio' | 'video';
|
|
7
|
-
/** Display name of the peer, shown
|
|
5
|
+
/** Display name of the peer, shown until LiveKit reports theirs. */
|
|
8
6
|
peerName?: string | null;
|
|
9
7
|
primaryColor?: string;
|
|
10
8
|
icons?: VideoCallIcons;
|
|
11
|
-
/** Start with the camera on (video calls). Default true. */
|
|
12
|
-
startWithCameraOn?: boolean;
|
|
13
|
-
/** Start with the microphone on. Default true. */
|
|
14
|
-
startWithMicOn?: boolean;
|
|
15
9
|
/** Render the compact floating-panel layout instead of the full screen. */
|
|
16
10
|
minimized?: boolean;
|
|
17
|
-
/** Toggle between full and minimized layouts
|
|
11
|
+
/** Toggle between full and minimized layouts. */
|
|
18
12
|
onToggleMinimize?: () => void;
|
|
19
|
-
onConnected?: () => void;
|
|
20
|
-
onError?: (message: string) => void;
|
|
21
13
|
onHangup: () => void;
|
|
22
14
|
}
|
|
15
|
+
export declare const formatCallDuration: (totalSeconds: number) => string;
|
|
23
16
|
/**
|
|
24
|
-
* The
|
|
17
|
+
* The call screen, React Native edition. Pure view over the LiveKit session
|
|
18
|
+
* owned by callSessionController.ts: it can unmount and remount (minimize,
|
|
19
|
+
* leaving the chat screen) without touching the connection.
|
|
25
20
|
*
|
|
26
|
-
* The web SDK builds this on `@livekit/components-react` hooks
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* connection state) in local React state, re-syncing on RoomEvent. Only the
|
|
30
|
-
* actual video surface comes from `@livekit/react-native` (`<VideoTrack />`),
|
|
31
|
-
* which wraps the native renderer.
|
|
32
|
-
*
|
|
33
|
-
* Requires `@livekit/react-native` >= 2.7 for the `trackRef` prop shape used
|
|
34
|
-
* below. Both LiveKit packages are optional peer deps, see livekitRuntime.ts.
|
|
21
|
+
* The web SDK builds this on `@livekit/components-react` hooks, which
|
|
22
|
+
* assume a DOM. Only the video surface comes from `@livekit/react-native`
|
|
23
|
+
* (`<VideoTrack />`, `trackRef` prop, >= 2.7).
|
|
35
24
|
*/
|
|
36
25
|
export declare const VideoCallSession: FC<VideoCallSessionProps>;
|
|
37
26
|
export default VideoCallSession;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoCallSession.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/VideoCallSession.tsx"],"names":[],"mappings":"AAAA,OAAc,
|
|
1
|
+
{"version":3,"file":"VideoCallSession.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/VideoCallSession.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAuB,MAAM,OAAO,CAAC;AAUvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAiCnD,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAkBD,eAAO,MAAM,kBAAkB,GAAI,cAAc,MAAM,KAAG,MAQzD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA2OtD,CAAC;AAsLF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CallSignalState } from '../../networking/callTokenStanza';
|
|
2
|
+
/**
|
|
3
|
+
* Call teardown that doesn't need a mounted component.
|
|
4
|
+
*
|
|
5
|
+
* It used to live inside VideoCallOverlay, which meant only a rendered
|
|
6
|
+
* overlay could end a call. The LiveKit session now outlives the UI
|
|
7
|
+
* (callSessionController.ts), so the session's own "peer left" and
|
|
8
|
+
* "disconnected" events need the same teardown, with the same local log
|
|
9
|
+
* entry and the same signal to the peer.
|
|
10
|
+
*/
|
|
11
|
+
export declare const terminateActiveCall: (state: CallSignalState) => void;
|
|
12
|
+
export declare const declineActiveCall: () => void;
|
|
13
|
+
/** `t` for code outside React, resolved by the same rule as useT. */
|
|
14
|
+
export declare const translateCallString: (key: string, vars?: Record<string, string | number>) => string;
|
|
15
|
+
//# sourceMappingURL=callActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callActions.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/callActions.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,eAAe,EAEhB,MAAM,kCAAkC,CAAC;AAG1C;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,eAAe,KAAG,IA2B5D,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,IAGpC,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,mBAAmB,GAC9B,KAAK,MAAM,EACX,OAAO,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAKF,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The LiveKit connection of the current call, owned outside React.
|
|
3
|
+
*
|
|
4
|
+
* It used to live in VideoCallSession's effect, so the connection was as
|
|
5
|
+
* long-lived as that component instance. Minimizing swapped the Modal for a
|
|
6
|
+
* floating View, React remounted the session, the effect cleanup
|
|
7
|
+
* disconnected, and the peer saw us leave (and hung up). The web SDK avoids
|
|
8
|
+
* that by keeping one LiveKitRoom element mounted across both layouts; the
|
|
9
|
+
* RN equivalent is to not tie the room to a component at all.
|
|
10
|
+
*
|
|
11
|
+
* Lifetime is driven by the call slice: a session exists while the call is
|
|
12
|
+
* 'connecting' or 'in-call' with a token, and is torn down by a store
|
|
13
|
+
* subscription the moment that stops being true (hangup, remote end,
|
|
14
|
+
* logout's resetCall), whether or not any call UI is mounted. Components
|
|
15
|
+
* only read the snapshot and call the controls.
|
|
16
|
+
*/
|
|
17
|
+
export interface CallSessionSnapshot {
|
|
18
|
+
/** A LiveKit room exists for the current call. */
|
|
19
|
+
active: boolean;
|
|
20
|
+
connected: boolean;
|
|
21
|
+
/** Translated, dismissible camera/mic problem. Never fails the call. */
|
|
22
|
+
deviceError: string | null;
|
|
23
|
+
micOn: boolean;
|
|
24
|
+
cameraOn: boolean;
|
|
25
|
+
speakerOn: boolean;
|
|
26
|
+
/** `{ participant, publication, source }` for `<VideoTrack />`, live and unmuted only. */
|
|
27
|
+
remoteVideo: any;
|
|
28
|
+
localVideo: any;
|
|
29
|
+
remoteName: string | null;
|
|
30
|
+
remoteJoined: boolean;
|
|
31
|
+
/** Peer joined but has no live microphone. */
|
|
32
|
+
remoteMicMuted: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* When the call truly connected: the later of the two LiveKit `joinedAt`
|
|
35
|
+
* stamps. The server sets them, so both sides count from the same moment
|
|
36
|
+
* (web's useSharedCallElapsed). Null until the peer is in.
|
|
37
|
+
*/
|
|
38
|
+
anchorAt: number | null;
|
|
39
|
+
}
|
|
40
|
+
export declare const useCallSession: () => CallSessionSnapshot;
|
|
41
|
+
export declare const stopCallSession: () => void;
|
|
42
|
+
export interface StartCallSessionOptions {
|
|
43
|
+
token: string;
|
|
44
|
+
livekitUrl: string;
|
|
45
|
+
kind: 'audio' | 'video';
|
|
46
|
+
startWithMicOn?: boolean;
|
|
47
|
+
startWithCameraOn?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Join the LiveKit room for the current call. Idempotent per (url, token):
|
|
51
|
+
* calling it again from a remounted overlay re-attaches to the same room.
|
|
52
|
+
*/
|
|
53
|
+
export declare const startCallSession: ({ token, livekitUrl, kind, startWithMicOn, startWithCameraOn, }: StartCallSessionOptions) => void;
|
|
54
|
+
export declare const toggleCallMic: () => Promise<void>;
|
|
55
|
+
export declare const toggleCallCamera: () => Promise<void>;
|
|
56
|
+
export declare const switchCallCamera: () => Promise<void>;
|
|
57
|
+
export declare const toggleCallSpeaker: () => Promise<void>;
|
|
58
|
+
export declare const dismissCallDeviceError: () => void;
|
|
59
|
+
/** Reset module state. Test seam only. */
|
|
60
|
+
export declare const __resetCallSessionForTests: () => void;
|
|
61
|
+
//# sourceMappingURL=callSessionController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callSessionController.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/callSessionController.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,0FAA0F;IAC1F,WAAW,EAAE,GAAG,CAAC;IACjB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,8CAA8C;IAC9C,cAAc,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AA4CD,eAAO,MAAM,cAAc,QAAO,mBACyB,CAAC;AAiE5D,eAAO,MAAM,eAAe,QAAO,IAkBlC,CAAC;AAiBF,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,iEAM9B,uBAAuB,KAAG,IA4H5B,CAAC;AAIF,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,IAAI,CAYlD,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,IAAI,CAarD,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAa,OAAO,CAAC,IAAI,CAqBrD,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAa,OAAO,CAAC,IAAI,CAoBtD,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAAO,IAEzC,CAAC;AAEF,0CAA0C;AAC1C,eAAO,MAAM,0BAA0B,QAAO,IAI7C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Animated } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Drag a floating element around (web's useDraggable, for the self-view
|
|
4
|
+
* tile and the minimized call panel). The offset is kept between drags.
|
|
5
|
+
*
|
|
6
|
+
* The responder only claims the gesture once the finger actually moves a
|
|
7
|
+
* few points, so taps still reach the buttons inside the dragged element.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useDraggable: () => {
|
|
10
|
+
panHandlers: import("react-native").GestureResponderHandlers;
|
|
11
|
+
style: {
|
|
12
|
+
transform: [{
|
|
13
|
+
translateX: Animated.AnimatedValue;
|
|
14
|
+
}, {
|
|
15
|
+
translateY: Animated.AnimatedValue;
|
|
16
|
+
}];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useDraggable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDraggable.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/useDraggable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAgB,MAAM,cAAc,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;;;;;;;;;CAmCxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRoomFromApi.d.ts","sourceRoot":"","sources":["../../../src/helpers/createRoomFromApi.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createRoomFromApi.d.ts","sourceRoot":"","sources":["../../../src/helpers/createRoomFromApi.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,gBAAgB,OAAO,CAAC,aAAa,CAAC,EACtC,SAAS,MAAM,KACd,WAAW,GAAG,SAkBhB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,KAAG,MAAM,GAAG,SAKZ,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAC1B,MAAM,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,UAAU,CAAC,GAAG;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,EACxE,WAAU,MAAU,KACnB,MAOF,CAAC;AAUF,eAAO,MAAM,iBAAiB,GAC5B,MAAM,OAAO,EACb,UAAS,MAA4C,EACrD,mBAAkB,MAAU,KAC3B,KAAK,GAAG,IA6BV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roomUserCount.d.ts","sourceRoot":"","sources":["../../../src/helpers/roomUserCount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,KAAK,WAAW,GACZ,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,CAAC,GACnC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"roomUserCount.d.ts","sourceRoot":"","sources":["../../../src/helpers/roomUserCount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,KAAK,WAAW,GACZ,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,CAAC,GACnC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GACzD,IAAI,GACJ,SAAS,CAAC;AAEd;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,WAAW,KAAG,MAUpD,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,sBAAsB,GAAI,MAAM,WAAW,KAAG,OAQ1D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,WAAW,EACjB,OAAO,CAAC,GAAG,CAAC,CAAC,EACb,mBAAmB,MAAM,KACxB,MAGF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drop repeated entries from a room's member list, keeping the first.
|
|
3
|
+
*
|
|
4
|
+
* The same person could appear twice in a 1:1 chat ("Members: 3", four
|
|
5
|
+
* rows): the list came back from the server with repeats after the private
|
|
6
|
+
* chat was requested again for an existing room. Members are keyed by
|
|
7
|
+
* whatever identity the entry carries: xmppUsername, then _id, then the
|
|
8
|
+
* JID's localpart.
|
|
9
|
+
*/
|
|
10
|
+
export declare const uniqueMembers: <T>(members: T[] | undefined | null) => T[];
|
|
11
|
+
//# sourceMappingURL=uniqueMembers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uniqueMembers.d.ts","sourceRoot":"","sources":["../../../src/helpers/uniqueMembers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,EAAG,SAAS,CAAC,EAAE,GAAG,SAAS,GAAG,IAAI,KAAG,CAAC,EAgBpE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Leave a chat, shared by the room-list swipe, the chat header and the chat
|
|
3
|
+
* profile. The server goes first: if it refuses, the chat stays where it is
|
|
4
|
+
* (dropping it locally would only have it come back on the next /chats/my).
|
|
5
|
+
* Then the unavailable presence to the MUC and the room out of the store.
|
|
6
|
+
* Resolves false on failure, so the caller can say so in its own way.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useLeaveRoom: () => (jid: string) => Promise<boolean>;
|
|
9
|
+
//# sourceMappingURL=useLeaveRoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLeaveRoom.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLeaveRoom.ts"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,cAIT,MAAM,KAAG,OAAO,CAAC,OAAO,CAqBvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../src/i18n/strings.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../src/i18n/strings.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AA4uEnD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAOzD,CAAC;AAEF,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC,gFAAgF;AAChF,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,GAAG,IAAI,KAAG,MAIf,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,MAAM,GAAG,IAAI,EACtB,YAAY,aAAa,GAAG,IAAI,KAC/B,aAQF,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,WAAW,GACtB,UAAU,MAAM,EAChB,OAAO,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAKF,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,YAAY,GACvB,KAAK,MAAM,EACX,SAAS,MAAM,GAAG,IAAI,EACtB,YAAY,aAAa,GAAG,IAAI,EAChC,OAAO,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAGF,CAAC"}
|
|
@@ -45,6 +45,14 @@ export declare function setRoomMuted(chatName: string, muted: boolean): Promise<
|
|
|
45
45
|
export declare function postReportRoom(data: PostReportRoom): Promise<any>;
|
|
46
46
|
export declare function postAddRoomMember(data: PostAddRoomMember): Promise<RoomMember[]>;
|
|
47
47
|
export declare function deleteRoomMember(data: DeleteRoomMember): Promise<any>;
|
|
48
|
+
/**
|
|
49
|
+
* Take the signed-in user out of a chat on the server (self-removal via the
|
|
50
|
+
* same endpoint that removes other members). The unavailable presence alone
|
|
51
|
+
* only leaves the MUC for this session: the backend keeps the user in
|
|
52
|
+
* `members` and the next /chats/my brings the chat back. A 404 means the
|
|
53
|
+
* server already has us out, which is what we wanted.
|
|
54
|
+
*/
|
|
55
|
+
export declare function leaveRoom(chatName: string): Promise<void>;
|
|
48
56
|
export declare function deleteRoom(name: string): Promise<any>;
|
|
49
57
|
export declare function createChatCall(chatName: string, options?: {
|
|
50
58
|
kind?: 'audio' | 'video';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooms.api.d.ts","sourceRoot":"","sources":["../../../../src/networking/api-requests/rooms.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"rooms.api.d.ts","sourceRoot":"","sources":["../../../../src/networking/api-requests/rooms.api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAwFnI;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhE;AAED,wBAAgB,QAAQ,IAAI,MAAM,CAKjC;AAqHD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAChC,OAAO,CAAC,OAAO,CAAC,CAuDlB;AAmBD;;;;GAIG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,EAAE,CAAA;CAAE,CAAC,CA2C9D;AAED,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAatE;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,QAAQ,gBAa5C;AAED,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,OAAe,GACpB,OAAO,CAAC,OAAO,CAAC,CAiBlB;AAED,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAarF;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,cAAc,gBAkBxD;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,UAAU,EAAE,CAAC,CAkBvB;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,gBAkB5D;AAED;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB/D;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,gBAc5C;AAqBD,wBAAsB,cAAc,CAClC,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;CAAE,GACrC,OAAO,CAAC,IAAI,CAAC,CAyBf;AAED,wBAAgB,mBAAmB,SAGlC;AAED,YAAY,EAAE,OAAO,EAAE,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;AAyU9B,eAAO,MAAM,kBAAkB,GAAI,QAAQ,OAAO,KAAG,OA6OpD,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xmppClient.d.ts","sourceRoot":"","sources":["../../../src/networking/xmppClient.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,MAAM,
|
|
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;AAKhC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AA+EvD,KAAK,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;AAEtE,UAAU,cAAc;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB;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HAT_COMPONENT_VERSION = "26.10.
|
|
1
|
+
export declare const ETHORA_CHAT_COMPONENT_VERSION = "26.10.3";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -21,18 +21,17 @@ import { useDispatch, useSelector, useStore } from 'react-redux';
|
|
|
21
21
|
import type { RootState } from '../../roomStore';
|
|
22
22
|
import Composing from '../styled/StyledInputComponents/Composing';
|
|
23
23
|
import {
|
|
24
|
-
deleteRoom,
|
|
25
24
|
setCurrentRoom,
|
|
26
25
|
setIsLoading,
|
|
27
26
|
} from '../../roomStore/roomsSlice';
|
|
28
|
-
import {
|
|
27
|
+
import { useLeaveRoom } from '../../hooks/useLeaveRoom';
|
|
29
28
|
import { setActiveModal } from '../../roomStore/chatSettingsSlice';
|
|
30
29
|
import { MODAL_TYPES } from '../../helpers/constants/MODAL_TYPES';
|
|
31
30
|
import { RoomMenu } from '../MenuRoom/MenuRoom';
|
|
32
31
|
import { useChatSettingState } from '../../hooks/useChatSettingState';
|
|
33
32
|
import { useFileToken } from '../../hooks/useFileToken';
|
|
34
33
|
import { appendFileToken } from '../../helpers/secureFileUrl';
|
|
35
|
-
import { View, StyleSheet, Text, Keyboard } from 'react-native';
|
|
34
|
+
import { Alert, View, StyleSheet, Text, Keyboard } from 'react-native';
|
|
36
35
|
import { getIconColor } from '../../helpers/getIconColor';
|
|
37
36
|
import { useTheme } from '../../hooks/useTheme';
|
|
38
37
|
import { resolveHeaderHeight } from '../../helpers/headerLayout';
|
|
@@ -52,7 +51,7 @@ const ChatHeader: React.FC<ChatHeaderProps> = ({
|
|
|
52
51
|
}) => {
|
|
53
52
|
const fileToken = useFileToken();
|
|
54
53
|
const dispatch = useDispatch();
|
|
55
|
-
const
|
|
54
|
+
const leaveRoom = useLeaveRoom();
|
|
56
55
|
|
|
57
56
|
const reduxStore = useStore<RootState>();
|
|
58
57
|
const activeRoomJID = useSelector(
|
|
@@ -79,16 +78,19 @@ const ChatHeader: React.FC<ChatHeaderProps> = ({
|
|
|
79
78
|
dispatch(setIsLoading({ chatJID: chat.jid, loading: true }));
|
|
80
79
|
};
|
|
81
80
|
|
|
82
|
-
const handleLeaveClick = useCallback(() => {
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
const handleLeaveClick = useCallback(async () => {
|
|
82
|
+
if (!activeRoomJID) {return;}
|
|
83
|
+
if (!(await leaveRoom(activeRoomJID))) {
|
|
84
|
+
Alert.alert(t('toast.error'), t('toast.leaveFailed'));
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
85
87
|
|
|
86
88
|
const nextRoomJID =
|
|
87
89
|
Object.keys(reduxStore.getState().rooms.rooms || {})[0] || null;
|
|
88
90
|
if (nextRoomJID) {
|
|
89
91
|
dispatch(setCurrentRoom({ roomJID: nextRoomJID }));
|
|
90
92
|
}
|
|
91
|
-
}, [activeRoomJID, reduxStore, dispatch,
|
|
93
|
+
}, [activeRoomJID, reduxStore, dispatch, leaveRoom, t]);
|
|
92
94
|
|
|
93
95
|
const handleHeaderChatMenu = () => {
|
|
94
96
|
Keyboard.dismiss();
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
Message,
|
|
9
9
|
} from '../styled/StyledComponents';
|
|
10
10
|
import { View } from 'react-native';
|
|
11
|
+
import { useT } from '../../i18n/useT';
|
|
12
|
+
import { formatCallLogLabel } from '../../helpers/callLogMessage';
|
|
11
13
|
|
|
12
14
|
interface MessageContainerProps {
|
|
13
15
|
CustomMessage?: React.ComponentType<{
|
|
@@ -48,6 +50,7 @@ const MessageContainerImpl: FC<MessageContainerProps> = ({
|
|
|
48
50
|
// empty/undefined ids as a match, briefly rendering catch-up messages
|
|
49
51
|
// from other users as our own. isOwnMessage() never does that.
|
|
50
52
|
const isUser = isOwnMessage(message, walletAddress);
|
|
53
|
+
const t = useT();
|
|
51
54
|
|
|
52
55
|
const messageDate = new Date(message.date);
|
|
53
56
|
|
|
@@ -68,7 +71,17 @@ const MessageContainerImpl: FC<MessageContainerProps> = ({
|
|
|
68
71
|
{SystemMessageComponent ? (
|
|
69
72
|
<SystemMessageComponent message={message} isUser={false} isReply={false} />
|
|
70
73
|
) : (
|
|
71
|
-
|
|
74
|
+
// A call-log entry is labelled from its callLog meta at render
|
|
75
|
+
// time so it follows the current language instead of being
|
|
76
|
+
// frozen in whatever was active when the stanza landed.
|
|
77
|
+
<SystemMessage
|
|
78
|
+
messageText={
|
|
79
|
+
message.callLog
|
|
80
|
+
? formatCallLogLabel(message.callLog, t, message.body)
|
|
81
|
+
: message.body
|
|
82
|
+
}
|
|
83
|
+
colors={config?.colors}
|
|
84
|
+
/>
|
|
72
85
|
)}
|
|
73
86
|
</Fragment>
|
|
74
87
|
);
|
|
@@ -18,9 +18,6 @@ import {
|
|
|
18
18
|
NativeScrollEvent,
|
|
19
19
|
NativeSyntheticEvent,
|
|
20
20
|
} from 'react-native';
|
|
21
|
-
import { useDispatch } from 'react-redux';
|
|
22
|
-
import { deleteRoom } from '../../roomStore/roomsSlice';
|
|
23
|
-
import { useXmppClient } from '../../context/xmppProvider';
|
|
24
21
|
import SwipeableRoomRow, { closeOpenRoomRow } from '../RoomComponents/SwipeableRoomRow';
|
|
25
22
|
import ReportChatModal from '../Modals/ChatProfileModal/ReportChatModal';
|
|
26
23
|
import { IRoom } from '../../types/types';
|
|
@@ -35,6 +32,7 @@ import { getIconColor } from '../../helpers/getIconColor';
|
|
|
35
32
|
import { useT } from '../../i18n/useT';
|
|
36
33
|
import { useTheme } from '../../hooks/useTheme';
|
|
37
34
|
import { useRoomMute } from '../../hooks/useRoomMute';
|
|
35
|
+
import { useLeaveRoom } from '../../hooks/useLeaveRoom';
|
|
38
36
|
import { isMessageSearchEnabled } from '../../helpers/isMessageSearchEnabled';
|
|
39
37
|
import { useMessageSearch } from '../Modals/MessageSearchModal/useMessageSearch';
|
|
40
38
|
import type { MessageSearchHit } from '../../networking/api-requests/messageSearch.api';
|
|
@@ -95,8 +93,6 @@ const RoomList: React.FC<RoomListProps> = ({
|
|
|
95
93
|
const { config } = useChatSettingState();
|
|
96
94
|
const t = useT();
|
|
97
95
|
const theme = useTheme();
|
|
98
|
-
const dispatch = useDispatch();
|
|
99
|
-
const { client } = useXmppClient();
|
|
100
96
|
|
|
101
97
|
const [open, setOpen] = useState(false);
|
|
102
98
|
// The room a swiped row's Report opened the form for.
|
|
@@ -141,9 +137,10 @@ const RoomList: React.FC<RoomListProps> = ({
|
|
|
141
137
|
setSearchTerm(text);
|
|
142
138
|
}, []);
|
|
143
139
|
|
|
144
|
-
// Behind a row swiped left. Leaving is the chat profile's flow:
|
|
145
|
-
//
|
|
140
|
+
// Behind a row swiped left. Leaving is the chat profile's flow: the
|
|
141
|
+
// server takes us out of the members, then the MUC and the store.
|
|
146
142
|
const swipeActions = !config?.disableRoomSwipeActions;
|
|
143
|
+
const leaveRoom = useLeaveRoom();
|
|
147
144
|
const handleLeaveRoom = useCallback(
|
|
148
145
|
(jid: string) => {
|
|
149
146
|
Alert.alert(t('modal.leaveChat.title'), t('modal.leaveChat.description'), [
|
|
@@ -151,18 +148,15 @@ const RoomList: React.FC<RoomListProps> = ({
|
|
|
151
148
|
{
|
|
152
149
|
text: t('action.leave'),
|
|
153
150
|
style: 'destructive',
|
|
154
|
-
onPress: () => {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
} catch (error) {
|
|
158
|
-
console.error('Failed to leave the room:', error);
|
|
151
|
+
onPress: async () => {
|
|
152
|
+
if (!(await leaveRoom(jid))) {
|
|
153
|
+
Alert.alert(t('toast.error'), t('toast.leaveFailed'));
|
|
159
154
|
}
|
|
160
|
-
dispatch(deleteRoom({ jid }));
|
|
161
155
|
},
|
|
162
156
|
},
|
|
163
157
|
]);
|
|
164
158
|
},
|
|
165
|
-
[
|
|
159
|
+
[leaveRoom, t]
|
|
166
160
|
);
|
|
167
161
|
const handleReportRoom = useCallback((jid: string) => setReportJid(jid), []);
|
|
168
162
|
const toggleRoomMuted = useRoomMute();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @format */
|
|
2
2
|
|
|
3
3
|
import { composeName } from '../../../helpers/displayName';
|
|
4
|
+
import { uniqueMembers } from '../../../helpers/uniqueMembers';
|
|
4
5
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
5
6
|
import {
|
|
6
7
|
Alert,
|
|
@@ -23,7 +24,7 @@ import { ProfileImagePlaceholder } from '../../MainComponents/ProfileImagePlaceh
|
|
|
23
24
|
import { RootState, getActiveRoom } from '../../../roomStore';
|
|
24
25
|
import { uploadFile } from '../../../networking/api-requests/auth.api';
|
|
25
26
|
import { useXmppClient } from '../../../context/xmppProvider';
|
|
26
|
-
import {
|
|
27
|
+
import { updateRoom } from '../../../roomStore/roomsSlice';
|
|
27
28
|
import Loader from '../../styled/Loader';
|
|
28
29
|
import {
|
|
29
30
|
AddNewIcon,
|
|
@@ -48,6 +49,7 @@ import { MODAL_TYPES } from '../../../helpers/constants/MODAL_TYPES';
|
|
|
48
49
|
import SelectUsersModal from '../SelectUsersModal/SelectUsersModal';
|
|
49
50
|
import { useToast } from '../../../context/ToastContext';
|
|
50
51
|
import { useRoomMute } from '../../../hooks/useRoomMute';
|
|
52
|
+
import { useLeaveRoom } from '../../../hooks/useLeaveRoom';
|
|
51
53
|
import { useT } from '../../../i18n/useT';
|
|
52
54
|
import DeleteChatModal from './DeleteChatModal';
|
|
53
55
|
import { isMessageSearchEnabled } from '../../../helpers/isMessageSearchEnabled';
|
|
@@ -111,6 +113,7 @@ const ChatProfileModal: React.FC<ChatProfileModalProps> = ({
|
|
|
111
113
|
const { showToast } = useToast();
|
|
112
114
|
const dispatch = useDispatch();
|
|
113
115
|
const { client } = useXmppClient();
|
|
116
|
+
const leaveRoom = useLeaveRoom();
|
|
114
117
|
const { user: stateUser, config } = useChatSettingState();
|
|
115
118
|
const theme = useTheme();
|
|
116
119
|
const styles = useMemo(() => createStyles(theme), [theme]);
|
|
@@ -155,12 +158,14 @@ const ChatProfileModal: React.FC<ChatProfileModalProps> = ({
|
|
|
155
158
|
// true total). Opening the profile loads the whole room directory (once per
|
|
156
159
|
// room, deduplicated, paged) and lists it after the known members.
|
|
157
160
|
const knownMembers = useMemo<RoomMember[]>(
|
|
158
|
-
|
|
161
|
+
// Deduped at display too: a list already cached with repeats (a 1:1
|
|
162
|
+
// chat showing four rows) cleans up without waiting for a refetch.
|
|
163
|
+
() => uniqueMembers(activeRoom?.roomMembers ?? activeRoom?.members ?? []),
|
|
159
164
|
[activeRoom?.roomMembers, activeRoom?.members]
|
|
160
165
|
);
|
|
161
166
|
const countSource = useMemo(
|
|
162
|
-
() => ({ members: knownMembers, usersCnt: activeRoom?.usersCnt }),
|
|
163
|
-
[knownMembers, activeRoom?.usersCnt]
|
|
167
|
+
() => ({ members: knownMembers, usersCnt: activeRoom?.usersCnt, type: activeRoom?.type }),
|
|
168
|
+
[knownMembers, activeRoom?.usersCnt, activeRoom?.type]
|
|
164
169
|
);
|
|
165
170
|
const membersTruncated = isRoomMembersTruncated(countSource);
|
|
166
171
|
const { members: directoryMembers, state: directoryState } =
|
|
@@ -335,22 +340,20 @@ const ChatProfileModal: React.FC<ChatProfileModalProps> = ({
|
|
|
335
340
|
);
|
|
336
341
|
};
|
|
337
342
|
|
|
338
|
-
// Leaving
|
|
339
|
-
// room from the store is what
|
|
340
|
-
// the UI, and the `!activeRoom` effect above then closes this modal.
|
|
343
|
+
// Leaving takes us out of the members on the server, then out of the MUC;
|
|
344
|
+
// dropping the room from the store is what takes the user out of the chat
|
|
345
|
+
// in the UI, and the `!activeRoom` effect above then closes this modal.
|
|
341
346
|
const handleLeave = () => {
|
|
342
347
|
Alert.alert(t('modal.leaveChat.title'), t('modal.leaveChat.description'), [
|
|
343
348
|
{ text: t('action.cancel'), style: 'cancel' },
|
|
344
349
|
{
|
|
345
350
|
text: t('action.leave'),
|
|
346
351
|
style: 'destructive',
|
|
347
|
-
onPress: () => {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
console.error('Failed to leave the room:', error);
|
|
352
|
+
onPress: async () => {
|
|
353
|
+
if (!(await leaveRoom(activeRoom?.jid || ''))) {
|
|
354
|
+
Alert.alert(t('toast.error'), t('toast.leaveFailed'));
|
|
355
|
+
return;
|
|
352
356
|
}
|
|
353
|
-
dispatch(deleteRoom({ jid: activeRoom?.jid || '' }));
|
|
354
357
|
handleCloseModal?.();
|
|
355
358
|
},
|
|
356
359
|
},
|