@medipha/chat 1.0.19 → 1.0.21
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/dist/features/message-list/bubble/message-reactions.d.ts +0 -4
- package/dist/index.cjs +44 -44
- package/dist/index.js +7315 -7278
- package/dist/store/messageRemovalStore.d.ts +21 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface Removal {
|
|
2
|
+
conversationId: string;
|
|
3
|
+
messageId: string;
|
|
4
|
+
/** Monotonic, so re-notifying the same message id still registers as a new event. */
|
|
5
|
+
token: number;
|
|
6
|
+
}
|
|
7
|
+
interface MessageRemovalState {
|
|
8
|
+
lastRemoval: Removal | null;
|
|
9
|
+
noteRemoval: (conversationId: string, messageId: string) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Broadcasts "a message was just removed" to views outside the timeline (the archive, the
|
|
13
|
+
* settings media/file preview) so they can refetch.
|
|
14
|
+
*
|
|
15
|
+
* They can't rely on the `message:removed` socket event alone: a recall is issued over REST
|
|
16
|
+
* and applied locally from that response, so the person doing the recall may never see the
|
|
17
|
+
* broadcast. This store is written from the one place that handles both paths
|
|
18
|
+
* (applyRemovedMessage in conversation-detail).
|
|
19
|
+
*/
|
|
20
|
+
export declare const useMessageRemovalStore: import('zustand').UseBoundStore<import('zustand').StoreApi<MessageRemovalState>>;
|
|
21
|
+
export {};
|