@droppii-org/chat-sdk 0.1.65 → 0.1.67
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/components/conversation-detail/ConversationMessageList.d.ts.map +1 -1
- package/dist/components/conversation-detail/ConversationMessageList.js +13 -1
- package/dist/components/conversation-detail/PinnedMessageBar.d.ts.map +1 -1
- package/dist/components/conversation-detail/PinnedMessageBar.js +11 -4
- package/dist/components/conversation-detail/PinnedMessagesPanel.js +1 -1
- package/dist/components/conversation-inbox/ConversationInboxItem.d.ts.map +1 -1
- package/dist/components/conversation-inbox/ConversationInboxItem.js +2 -2
- package/dist/components/message/item/index.d.ts.map +1 -1
- package/dist/components/message/item/index.js +4 -43
- package/dist/components/message/toolbox/MessageToolboxMenu.js +1 -1
- package/dist/components/message/toolbox/types.d.ts +1 -0
- package/dist/components/message/toolbox/types.d.ts.map +1 -1
- package/dist/components/message/toolbox/types.js +1 -0
- package/dist/hooks/global/useGlobalEvent.d.ts.map +1 -1
- package/dist/hooks/global/useGlobalEvent.js +9 -10
- package/dist/hooks/message/useMessage.d.ts.map +1 -1
- package/dist/hooks/message/useMessage.js +4 -1
- package/dist/hooks/message/useRevokeMessage.d.ts +1 -0
- package/dist/hooks/message/useRevokeMessage.d.ts.map +1 -1
- package/dist/hooks/message/useRevokeMessage.js +22 -0
- package/dist/locales/vi/common.json +6 -1
- package/dist/store/conversation.d.ts.map +1 -1
- package/dist/store/conversation.js +6 -0
- package/dist/store/type.d.ts +3 -0
- package/dist/store/type.d.ts.map +1 -1
- package/dist/styles/global.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/common.d.ts +1 -1
- package/dist/utils/common.d.ts.map +1 -1
- package/dist/utils/common.js +11 -10
- package/package.json +127 -126
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationMessageList.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationMessageList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConversationMessageList.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationMessageList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAkBzE,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,QAAA,MAAM,uBAAuB,GAAI,gBAAgB,4BAA4B,4CAuL5E,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -9,6 +9,7 @@ import MessageInfiniteScroll from "../../components/message/MessageInfiniteScrol
|
|
|
9
9
|
import { useMessage } from "../../hooks/message/useMessage";
|
|
10
10
|
import { useMessageListScroll } from "../../hooks/message/useMessageListScroll";
|
|
11
11
|
import { usePinMessage } from "../../hooks/message/usePinMessage";
|
|
12
|
+
import { useRevokeMessage } from "../../hooks/message/useRevokeMessage";
|
|
12
13
|
import useConversationStore from "../../store/conversation";
|
|
13
14
|
import useAuthStore from "../../store/auth";
|
|
14
15
|
import { isGroupChat as resolveIsGroupChat } from "../../utils/conversation";
|
|
@@ -59,6 +60,17 @@ const ConversationMessageList = ({ bottomSlot }) => {
|
|
|
59
60
|
toastMessage.error(tCommon("unpin_message_failed"));
|
|
60
61
|
}
|
|
61
62
|
}, [conversationId, unpinMessage, tCommon]);
|
|
63
|
+
const { revokeMessage } = useRevokeMessage();
|
|
64
|
+
const handleRevokeMessage = useCallback(async (clientMsgID) => {
|
|
65
|
+
closeToolbox();
|
|
66
|
+
try {
|
|
67
|
+
await revokeMessage(conversationId, clientMsgID);
|
|
68
|
+
toastMessage.success(tCommon("revoke_message_success"));
|
|
69
|
+
}
|
|
70
|
+
catch (_a) {
|
|
71
|
+
toastMessage.error(tCommon("revoke_message_failed"));
|
|
72
|
+
}
|
|
73
|
+
}, [closeToolbox, conversationId, revokeMessage, tCommon]);
|
|
62
74
|
const onPressQuoteMessage = useCallback((clientMsgID) => {
|
|
63
75
|
const hasMessage = loadState.messageList.some((msg) => msg.clientMsgID === clientMsgID);
|
|
64
76
|
if (hasMessage) {
|
|
@@ -80,6 +92,6 @@ const ConversationMessageList = ({ bottomSlot }) => {
|
|
|
80
92
|
target: scrollRef,
|
|
81
93
|
enable: !!openToolboxMessageId,
|
|
82
94
|
});
|
|
83
|
-
return (_jsxs("div", { "data-testid": "conversation-message-list", className: "relative flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-white", children: [isMessageLoading ? (_jsx("div", { className: "flex flex-1 items-center justify-center py-12", children: _jsx(Spin, {}) })) : (_jsxs(MessageInfiniteScroll, { scrollRef: scrollRef, scrollableTargetId: "scrollableConversationMessagesDiv", loadState: loadState, moreOldLoading: moreOldLoading, onLoadMoreOld: loadMoreOldMessage, onScroll: handleInfiniteScroll, containerClassName: "h-full", empty: _jsx("div", { className: "flex flex-1 items-center justify-center py-12", children: _jsx(Empty, { description: t("empty.no_messages") }) }), children: [bottomSlot, loadState.messageList.map((message, index, array) => (_jsx(MessageItem, { message: message, allMessages: array, isGroupChat: isGroupChat, forceHideTip: index === 0 && !!bottomSlot, contextMenuOpen: openToolboxMessageId === message.clientMsgID, onContextMenuOpenChange: (open) => setOpenToolboxMessageId(open ? message.clientMsgID : null), onQuoteMessage: setQuotedMessage, onRevokeMessage:
|
|
95
|
+
return (_jsxs("div", { "data-testid": "conversation-message-list", className: "relative flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-white", children: [isMessageLoading ? (_jsx("div", { className: "flex flex-1 items-center justify-center py-12", children: _jsx(Spin, {}) })) : (_jsxs(MessageInfiniteScroll, { scrollRef: scrollRef, scrollableTargetId: "scrollableConversationMessagesDiv", loadState: loadState, moreOldLoading: moreOldLoading, onLoadMoreOld: loadMoreOldMessage, onScroll: handleInfiniteScroll, containerClassName: "h-full", empty: _jsx("div", { className: "flex flex-1 items-center justify-center py-12", children: _jsx(Empty, { description: t("empty.no_messages") }) }), children: [bottomSlot, loadState.messageList.map((message, index, array) => (_jsx(MessageItem, { message: message, allMessages: array, isGroupChat: isGroupChat, forceHideTip: index === 0 && !!bottomSlot, contextMenuOpen: openToolboxMessageId === message.clientMsgID, onContextMenuOpenChange: (open) => setOpenToolboxMessageId(open ? message.clientMsgID : null), onQuoteMessage: setQuotedMessage, onRevokeMessage: handleRevokeMessage, onPressQuoteMessage: onPressQuoteMessage, onPinMessage: handlePinMessage, onUnpinMessage: handleUnpinMessage, enableLongPress: true }, message.clientMsgID)))] })), _jsx(PinLimitModal, { open: pinLimitModalOpen, max: pinnedTotalCount, onClose: () => setPinLimitModalOpen(false) })] }));
|
|
84
96
|
};
|
|
85
97
|
export default ConversationMessageList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PinnedMessageBar.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/PinnedMessageBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PinnedMessageBar.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/PinnedMessageBar.tsx"],"names":[],"mappings":"AAgHA,QAAA,MAAM,gBAAgB,sDAyFrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
3
4
|
import clsx from "clsx";
|
|
4
5
|
import { useTranslation } from "react-i18next";
|
|
5
6
|
import { MessageType } from "@openim/wasm-client-sdk";
|
|
@@ -9,6 +10,7 @@ import useAuthStore from "../../store/auth";
|
|
|
9
10
|
import useConversationStore from "../../store/conversation";
|
|
10
11
|
import { usePinnedMessages } from "../../hooks/message/usePinnedMessages";
|
|
11
12
|
import { parseUrlMetadata } from "../../utils/common";
|
|
13
|
+
import PinnedMessagesPanel from "./PinnedMessagesPanel";
|
|
12
14
|
const PINNED_SUBTITLE_KEY_BY_TYPE = {
|
|
13
15
|
[MessageType.UrlTextMessage]: "pinned_from_link",
|
|
14
16
|
[MessageType.PictureMessage]: "pinned_from_image",
|
|
@@ -73,6 +75,7 @@ const PinnedMessageBar = () => {
|
|
|
73
75
|
const selectedConversationId = useConversationStore((state) => state.selectedConversationId);
|
|
74
76
|
const conversationId = selectedConversationId || (conversation === null || conversation === void 0 ? void 0 : conversation.conversationID) || "";
|
|
75
77
|
const { pinnedMessageList, pinnedTotalCount } = usePinnedMessages(conversationId);
|
|
78
|
+
const [isPanelOpen, setIsPanelOpen] = useState(false);
|
|
76
79
|
const latestPinnedMessage = pinnedMessageList[0];
|
|
77
80
|
if (!latestPinnedMessage)
|
|
78
81
|
return null;
|
|
@@ -80,16 +83,20 @@ const PinnedMessageBar = () => {
|
|
|
80
83
|
const senderName = isMe
|
|
81
84
|
? t("your_self")
|
|
82
85
|
: latestPinnedMessage.senderNickname || t("message_sender_unnamed");
|
|
86
|
+
const isRevoked = latestPinnedMessage.contentType === MessageType.RevokeMessage;
|
|
83
87
|
const subtitleKey = PINNED_SUBTITLE_KEY_BY_TYPE[latestPinnedMessage.contentType] ||
|
|
84
88
|
"pinned_from_text";
|
|
85
|
-
const title =
|
|
89
|
+
const title = isRevoked
|
|
90
|
+
? t("revoked")
|
|
91
|
+
: getPinnedMessageTitle(latestPinnedMessage);
|
|
86
92
|
const showTitle = !TITLE_LESS_MESSAGE_TYPES.includes(latestPinnedMessage.contentType) &&
|
|
87
93
|
Boolean(title);
|
|
88
|
-
const hasThumbnail =
|
|
94
|
+
const hasThumbnail = !isRevoked &&
|
|
95
|
+
latestPinnedMessage.contentType !== MessageType.TextMessage &&
|
|
89
96
|
latestPinnedMessage.contentType !== MessageType.QuoteMessage;
|
|
90
97
|
const hasFlushThumbnail = hasThumbnail &&
|
|
91
98
|
latestPinnedMessage.contentType !== MessageType.FileMessage;
|
|
92
99
|
const remainingPinnedCount = pinnedTotalCount - 1;
|
|
93
|
-
return (_jsxs("div", { "data-testid": "pinned-message-bar", className: clsx("flex w-full shrink-0 items-center gap-3 bg-gray-cool-25 pr-3", hasFlushThumbnail ? "py-0 pl-0" : "py-1 pl-3"), children: [hasThumbnail && _jsx(PinnedMessageThumbnail, { message: latestPinnedMessage }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col justify-center", children: [showTitle && (_jsx("p", { className: "truncate text-sm font-medium leading-[160%] text-gray-900", children: title })), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Icon, { icon: "thumbtack-b", size: 12, className: "text-primary-400" }), _jsx("p", { className: "truncate text-[13px] leading-[160%] text-gray-600", children: t(subtitleKey, { name: senderName }) })] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [remainingPinnedCount > 0 && (_jsxs("span", { className: "flex min-w-[26px] items-center justify-center rounded-full border-2 border-white bg-gradient-danger-light px-1 text-xs font-bold leading-[160%] text-white", children: ["+", remainingPinnedCount] })), _jsx(Icon, { icon: "angle-down-o", size: 20, className: "text-gray-600" })] })] }));
|
|
100
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { "data-testid": "pinned-message-bar", role: "button", tabIndex: 0, onClick: () => setIsPanelOpen(true), className: clsx("flex w-full shrink-0 cursor-pointer items-center gap-3 bg-gray-cool-25 pr-3", hasFlushThumbnail ? "py-0 pl-0" : "py-1 pl-3"), children: [hasThumbnail && (_jsx(PinnedMessageThumbnail, { message: latestPinnedMessage })), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col justify-center", children: [showTitle && (_jsx("p", { className: "truncate text-sm font-medium leading-[160%] text-gray-900", children: title })), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Icon, { icon: "thumbtack-b", size: 12, className: "text-primary-400" }), _jsx("p", { className: "truncate text-[13px] leading-[160%] text-gray-600", children: t(subtitleKey, { name: senderName }) })] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [remainingPinnedCount > 0 && (_jsxs("span", { className: "flex min-w-[26px] items-center justify-center rounded-full border-2 border-white bg-gradient-danger-light px-1 text-xs font-bold leading-[160%] text-white", children: ["+", remainingPinnedCount] })), _jsx(Icon, { icon: "angle-down-o", size: 20, className: "text-gray-600" })] })] }), _jsx(PinnedMessagesPanel, { open: isPanelOpen, onClose: () => setIsPanelOpen(false) })] }));
|
|
94
101
|
};
|
|
95
102
|
export default PinnedMessageBar;
|
|
@@ -26,9 +26,9 @@ const PinnedMessagesPanel = ({ open, onClose }) => {
|
|
|
26
26
|
setOpenContextMenuId(null);
|
|
27
27
|
try {
|
|
28
28
|
await unpinMessage(conversationId, message.clientMsgID);
|
|
29
|
+
toastMessage.success(t("unpin_message_success"));
|
|
29
30
|
}
|
|
30
31
|
catch (error) {
|
|
31
|
-
console.error("unpinMessage failed", error);
|
|
32
32
|
toastMessage.error(t("unpin_message_failed"));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationInboxItem.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-inbox/ConversationInboxItem.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConversationInboxItem.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-inbox/ConversationInboxItem.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAYjE,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAC/C;AAQD,QAAA,MAAM,qBAAqB,GAAI,mBAAmB,0BAA0B,4CA0C3E,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import dayjs from "dayjs";
|
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import useAuthStore from "../../store/auth";
|
|
6
6
|
import { formatTimestamp, parseLatestMessage } from "../../utils/common";
|
|
7
|
-
import {
|
|
7
|
+
import { resolvePeerBadgeLabel, resolveConversationDisplayName, } from "../../utils/conversation";
|
|
8
8
|
import { useConversationAvatarUrl } from "../../hooks/conversation/useConversationAvatarUrl";
|
|
9
9
|
import ThreadCard from "../../components/conversation/ThreadCard";
|
|
10
10
|
import ConversationPeerAvatar from "./ConversationPeerAvatar";
|
|
@@ -23,7 +23,7 @@ const ConversationInboxItem = ({ item, onClick }) => {
|
|
|
23
23
|
const displayName = resolveConversationDisplayName(item, t);
|
|
24
24
|
const avatarUrl = useConversationAvatarUrl(item);
|
|
25
25
|
const badgeLabel = resolvePeerBadgeLabel(item.peerType, t);
|
|
26
|
-
const latestMessagePreview = parseLatestMessage(item.latestMsg, currentUserId, tCommon
|
|
26
|
+
const latestMessagePreview = parseLatestMessage(item.latestMsg, currentUserId, tCommon);
|
|
27
27
|
const latestMessageTime = formatLatestMessageTime(item.latestMsgSendTime || null);
|
|
28
28
|
const unreadCount = (_a = item.unreadCount) !== null && _a !== void 0 ? _a : 0;
|
|
29
29
|
return (_jsx(ThreadCard, { testId: "conversation-inbox-thread-card", onClick: () => onClick(item), unreadCount: unreadCount, time: latestMessageTime, preview: latestMessagePreview, avatar: _jsx(ConversationPeerAvatar, { peerType: item.peerType, displayName: displayName, avatarUrl: avatarUrl, badgeLabel: badgeLabel }), title: _jsx(ConversationInboxTitle, { peerType: item.peerType, displayName: displayName, hasUnread: unreadCount > 0 }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,IAAI,eAAe,EAG/B,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,IAAI,eAAe,EAG/B,MAAM,yBAAyB,CAAC;AAiCjC,UAAU,gBAAgB;IACxB,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IACpD,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAeD,QAAA,MAAM,WAAW,GAAI,qMAalB,gBAAgB,mDAuRlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,29 +1,22 @@
|
|
|
1
1
|
import { createElement as _createElement } from "react";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { Dropdown, message as toastMessage } from "antd";
|
|
6
6
|
import { MessageStatus, MessageType, } from "@openim/wasm-client-sdk";
|
|
7
|
-
import TextMessageItem from "./TextMessage";
|
|
8
|
-
import ImageMessageItem from "./ImageMessage";
|
|
9
|
-
import FileMessageItem from "./FileMessage";
|
|
10
|
-
import VideoMessageItem from "./VideoMessage";
|
|
11
|
-
import MergeImageMessageItem from "./MergeImageMessage";
|
|
12
7
|
import MessageBubble from "./MessageBubble";
|
|
8
|
+
import { renderBubbleContent } from "./renderMessageContent";
|
|
13
9
|
import { getVisibleNeighbor, visibleTypeMessage, } from "../../../hooks/message/useMessage";
|
|
14
10
|
import { MSG_ITEM_CONTENT_PREFIX, MSG_ITEM_PREFIX } from "../../../constants";
|
|
15
11
|
import { formatTimestamp } from "../../../utils/common";
|
|
16
12
|
import useAuthStore from "../../../store/auth";
|
|
17
13
|
import useConversationStore from "../../../store/conversation";
|
|
18
|
-
import {
|
|
14
|
+
import { useMemo, useRef } from "react";
|
|
19
15
|
import { useLongPress } from "ahooks";
|
|
20
16
|
import { Trans, useTranslation } from "react-i18next";
|
|
21
|
-
import UrlTextMessageItem from "./UrlTextMessage";
|
|
22
17
|
import MessageStatusIndicator from "./MessageStatusIndicator";
|
|
23
18
|
import { useSendMessage, isMediaResendable, } from "../../../hooks/message/useSendMessage";
|
|
24
19
|
import { Icon } from "../../../components/icon";
|
|
25
|
-
import RevokeMessageItem from "./RevokeMessage";
|
|
26
|
-
import QuoteMessageItem from "./QuoteMessage";
|
|
27
20
|
import SystemLogMessageItem from "./SystemLogMessage";
|
|
28
21
|
import { isSystemLogMessageType } from "../../../utils/messageLog";
|
|
29
22
|
import { buildMessageToolboxMenuItems, getCopyableMessageText, isCopyableMessageType, isPinnableMessageType, MessageToolboxActionKey, MESSAGE_TOOLBOX_OVERLAY_CLASSNAME, useMessageToolboxVisibility, } from "../../../components/message/toolbox";
|
|
@@ -35,29 +28,6 @@ const MessageItem = ({ message, allMessages, isGroupChat = false, forceHideTip =
|
|
|
35
28
|
const userID = useAuthStore((state) => state.userID);
|
|
36
29
|
const isCrm = useAuthStore((state) => state.isCrm);
|
|
37
30
|
const conversationData = useConversationStore((state) => state.conversationData);
|
|
38
|
-
const renderMessageByType = useCallback((item) => {
|
|
39
|
-
switch (item === null || item === void 0 ? void 0 : item.contentType) {
|
|
40
|
-
case MessageType.TextMessage:
|
|
41
|
-
case MessageType.QuoteMessage:
|
|
42
|
-
return _jsx(TextMessageItem, { message: item });
|
|
43
|
-
case MessageType.PictureMessage:
|
|
44
|
-
return _jsx(ImageMessageItem, { message: item });
|
|
45
|
-
case MessageType.FileMessage:
|
|
46
|
-
return _jsx(FileMessageItem, { message: item });
|
|
47
|
-
case MessageType.VideoMessage:
|
|
48
|
-
return _jsx(VideoMessageItem, { message: item });
|
|
49
|
-
case MessageType.MergeMessage:
|
|
50
|
-
return _jsx(MergeImageMessageItem, { message: item });
|
|
51
|
-
case MessageType.UrlTextMessage:
|
|
52
|
-
return _jsx(UrlTextMessageItem, { message: item });
|
|
53
|
-
case MessageType.LogTextMessage:
|
|
54
|
-
return _jsx(SystemLogMessageItem, { message: item });
|
|
55
|
-
case MessageType.RevokeMessage:
|
|
56
|
-
return _jsx(RevokeMessageItem, {});
|
|
57
|
-
default:
|
|
58
|
-
return _jsx(TextMessageItem, { message: item });
|
|
59
|
-
}
|
|
60
|
-
}, []);
|
|
61
31
|
const { isDeliveredForUi, isRevocable, isMine } = useMessageToolboxVisibility(message, userID);
|
|
62
32
|
const contextMenuItems = useMemo(() => {
|
|
63
33
|
if ((message === null || message === void 0 ? void 0 : message.contentType) === MessageType.RevokeMessage ||
|
|
@@ -176,16 +146,7 @@ const MessageItem = ({ message, allMessages, isGroupChat = false, forceHideTip =
|
|
|
176
146
|
timeBreakNode,
|
|
177
147
|
_jsx(SystemLogMessageItem, { message: message })));
|
|
178
148
|
}
|
|
179
|
-
const
|
|
180
|
-
if (message === null || message === void 0 ? void 0 : message.quoteElem) {
|
|
181
|
-
return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx(QuoteMessageItem, { message: message, onPressQuoteMessage: onPressQuoteMessage }), renderMessageByType(message)] }));
|
|
182
|
-
}
|
|
183
|
-
if ((message === null || message === void 0 ? void 0 : message.contentType) === MessageType.MergeMessage) {
|
|
184
|
-
return (_jsxs(_Fragment, { children: [_jsx(MergeImageMessageItem, { message: message }), (message === null || message === void 0 ? void 0 : message.textElem) && _jsx(TextMessageItem, { message: message })] }));
|
|
185
|
-
}
|
|
186
|
-
return renderMessageByType(message);
|
|
187
|
-
};
|
|
188
|
-
const bubbleNode = (_jsx(MessageBubble, { isMine: isMine, isInternal: isInternalMessage, senderName: message === null || message === void 0 ? void 0 : message.senderNickname, showSenderName: showSenderName, showTip: showTip, id: `${MSG_ITEM_CONTENT_PREFIX}${message === null || message === void 0 ? void 0 : message.clientMsgID}`, content: renderBubbleContent() }));
|
|
149
|
+
const bubbleNode = (_jsx(MessageBubble, { isMine: isMine, isInternal: isInternalMessage, senderName: message === null || message === void 0 ? void 0 : message.senderNickname, showSenderName: showSenderName, showTip: showTip, id: `${MSG_ITEM_CONTENT_PREFIX}${message === null || message === void 0 ? void 0 : message.clientMsgID}`, content: renderBubbleContent(message, onPressQuoteMessage) }));
|
|
189
150
|
const showPinnedBadge = Boolean(message === null || message === void 0 ? void 0 : message.isPinned) && Boolean(onPinMessage);
|
|
190
151
|
const pinnedBadgeNode = showPinnedBadge ? (_jsx("span", { "data-testid": "message-pinned-badge", className: clsx("absolute -top-2.5 z-[1] flex h-[22px] w-[26px] items-center justify-center rounded-full border border-white bg-gray-25", isMine ? "left-0" : "right-0"), children: _jsx(Icon, { icon: "thumbtack-b", size: 12, className: "text-primary-400" }) })) : null;
|
|
191
152
|
const wrappedBubble = hasContextMenu ? (_jsx(Dropdown, { menu: { items: contextMenuItems }, trigger: ["contextMenu"], open: contextMenuOpen, onOpenChange: onContextMenuOpenChange, overlayClassName: MESSAGE_TOOLBOX_OVERLAY_CLASSNAME, children: _jsxs("div", { ref: bubbleWrapperRef, className: "relative min-w-0", children: [bubbleNode, pinnedBadgeNode] }) })) : (_jsxs("div", { className: "relative min-w-0", children: [bubbleNode, pinnedBadgeNode] }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { Icon } from "../../../components/icon";
|
|
4
|
-
export const MESSAGE_TOOLBOX_OVERLAY_CLASSNAME = clsx("[&_.ant-dropdown-menu]:min-w-[200px]", "[&_.ant-dropdown-menu]:rounded-2xl", "[&_.ant-dropdown-menu]:p-0", "[&_.ant-dropdown-menu]:py-2", "[&_.ant-dropdown-menu]:shadow-message-toolbox", "[&_.ant-dropdown-menu-item]:rounded-none", "[&_.ant-dropdown-menu-item]
|
|
4
|
+
export const MESSAGE_TOOLBOX_OVERLAY_CLASSNAME = clsx("[&_.ant-dropdown-menu]:min-w-[200px]", "[&_.ant-dropdown-menu]:rounded-2xl", "[&_.ant-dropdown-menu]:p-0", "[&_.ant-dropdown-menu]:py-2", "[&_.ant-dropdown-menu]:shadow-message-toolbox", "[&_.ant-dropdown-menu-item]:rounded-none", "[&_.ant-dropdown-menu-item]:!px-4", "[&_.ant-dropdown-menu-item]:!py-1.5");
|
|
5
5
|
const ToolboxMenuRow = ({ icon, label, danger = false }) => (_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Icon, { icon: icon, size: 24, className: danger ? "text-danger-400" : "text-gray-900" }), _jsx("span", { className: clsx("text-base font-medium", danger ? "text-danger-400" : "text-gray-900"), children: label })] }));
|
|
6
6
|
export const buildMessageToolboxMenuItems = (actions) => actions.map((action) => ({
|
|
7
7
|
key: action.key,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/message/toolbox/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/message/toolbox/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;;;;;;;CAO1B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,uBAAuB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGlobalEvent.d.ts","sourceRoot":"","sources":["../../../src/hooks/global/useGlobalEvent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useGlobalEvent.d.ts","sourceRoot":"","sources":["../../../src/hooks/global/useGlobalEvent.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,cAAc,YA8U1B,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
|
+
import { useLatest } from "ahooks";
|
|
2
3
|
import { DChatSDK } from "../../constants/sdk";
|
|
3
4
|
import { CbEvents, MessageType, SessionType, } from "@openim/wasm-client-sdk";
|
|
4
5
|
import { BusinessNotificationType, ConnectStatus, CustomType, SyncStatus, } from "../../types/chat";
|
|
5
6
|
import { pushNewMessage, updateOneMessage } from "../../hooks/message/useMessage";
|
|
6
7
|
import { fetchPinnedMessages } from "../../hooks/message/usePinnedMessages";
|
|
8
|
+
import { applyRevokedMessage } from "../../hooks/message/useRevokeMessage";
|
|
7
9
|
import { useChatContext } from "../../context/ChatContext";
|
|
8
10
|
import useConversationStore from "../../store/conversation";
|
|
9
11
|
import useAuthStore from "../../store/auth";
|
|
@@ -17,6 +19,7 @@ import emitter from "../../utils/events";
|
|
|
17
19
|
const notPushType = [MessageType.TypingMessage, MessageType.RevokeMessage];
|
|
18
20
|
export const useGlobalEvent = () => {
|
|
19
21
|
const { user } = useChatContext();
|
|
22
|
+
const userRef = useLatest(user);
|
|
20
23
|
const queryClient = useQueryClient();
|
|
21
24
|
const { updateConnectStatus, updateSyncStatus, getSelfUserInfo } = useChatContext();
|
|
22
25
|
const updateConversationList = useConversationStore((state) => state.updateConversationList);
|
|
@@ -42,13 +45,7 @@ export const useGlobalEvent = () => {
|
|
|
42
45
|
]);
|
|
43
46
|
};
|
|
44
47
|
const revokedMessageHandler = ({ data }) => {
|
|
45
|
-
|
|
46
|
-
clientMsgID: data.clientMsgID,
|
|
47
|
-
contentType: MessageType.RevokeMessage,
|
|
48
|
-
notificationElem: {
|
|
49
|
-
detail: JSON.stringify(data),
|
|
50
|
-
},
|
|
51
|
-
});
|
|
48
|
+
applyRevokedMessage(data.clientMsgID);
|
|
52
49
|
};
|
|
53
50
|
const messagePinnedHandler = ({ data }) => {
|
|
54
51
|
updateOneMessage({
|
|
@@ -64,11 +61,12 @@ export const useGlobalEvent = () => {
|
|
|
64
61
|
}
|
|
65
62
|
};
|
|
66
63
|
const inCurrentConversation = (newServerMsg) => {
|
|
64
|
+
var _a;
|
|
67
65
|
const selectedSourceId = useConversationStore.getState().selectedSourceId;
|
|
68
66
|
switch (newServerMsg.sessionType) {
|
|
69
67
|
case SessionType.Single:
|
|
70
68
|
return (newServerMsg.sendID === selectedSourceId ||
|
|
71
|
-
((
|
|
69
|
+
!!(((_a = userRef.current) === null || _a === void 0 ? void 0 : _a.userID) && newServerMsg.recvID === selectedSourceId));
|
|
72
70
|
case SessionType.Group:
|
|
73
71
|
case SessionType.WorkingGroup:
|
|
74
72
|
return newServerMsg.groupID === selectedSourceId;
|
|
@@ -79,7 +77,7 @@ export const useGlobalEvent = () => {
|
|
|
79
77
|
}
|
|
80
78
|
};
|
|
81
79
|
const handleNewMessage = (newServerMsg) => {
|
|
82
|
-
var _a, _b;
|
|
80
|
+
var _a, _b, _c;
|
|
83
81
|
let customData = null;
|
|
84
82
|
if (newServerMsg.contentType === MessageType.CustomMessage) {
|
|
85
83
|
const rawCustomData = (_b = (_a = newServerMsg.customElem) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.trim();
|
|
@@ -102,7 +100,7 @@ export const useGlobalEvent = () => {
|
|
|
102
100
|
if (!notPushType.includes(newServerMsg.contentType)) {
|
|
103
101
|
pushNewMessage(newServerMsg);
|
|
104
102
|
}
|
|
105
|
-
if (newServerMsg.sendID !== (
|
|
103
|
+
if (newServerMsg.sendID !== ((_c = userRef.current) === null || _c === void 0 ? void 0 : _c.userID)) {
|
|
106
104
|
queryClient.invalidateQueries({
|
|
107
105
|
queryKey: [QUERY_KEYS.GET_LIST_SESSION_BY_CONVERSATION],
|
|
108
106
|
});
|
|
@@ -241,6 +239,7 @@ export const useGlobalEvent = () => {
|
|
|
241
239
|
DChatSDK.off(CbEvents.OnSyncServerFailed, syncFailedHandler);
|
|
242
240
|
// message
|
|
243
241
|
DChatSDK.off(CbEvents.OnRecvNewMessages, newMessageHandler);
|
|
242
|
+
DChatSDK.off(CbEvents.OnNewRecvMessageRevoked, revokedMessageHandler);
|
|
244
243
|
DChatSDK.off(CbEvents.OnRecvMessagePinned, messagePinnedHandler);
|
|
245
244
|
// conversation
|
|
246
245
|
DChatSDK.off(CbEvents.OnConversationChanged, conversationChangeHandler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,WAAW,EACX,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AAUjC,eAAO,MAAM,kBAAkB,eAgB9B,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,iBAAiB,MAAM,EACvB,oBAAoB,MAAM,EAC1B,iBAAc,EACd,uBAAqB;;;;;qBAeA,WAAW,EAAE;;;;;;qBAAb,WAAW,EAAE;;;;;;
|
|
1
|
+
{"version":3,"file":"useMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,WAAW,EACX,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AAUjC,eAAO,MAAM,kBAAkB,eAgB9B,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,iBAAiB,MAAM,EACvB,oBAAoB,MAAM,EAC1B,iBAAc,EACd,uBAAqB;;;;;qBAeA,WAAW,EAAE;;;;;;qBAAb,WAAW,EAAE;;;;;;CAiSnC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,WAAW,SACpB,CAAC;AAChC,eAAO,MAAM,gBAAgB,GAAI,SAAS,WAAW,SACpB,CAAC;AAClC,eAAO,MAAM,gBAAgB,GAAI,aAAa,MAAM,SACf,CAAC;AAEtC,eAAO,MAAM,kBAAkB,GAC7B,aAAa,WAAW,EAAE,EAC1B,SAAS,WAAW,EACpB,WAAW,MAAM,GAAG,MAAM,KACzB,WAAW,GAAG,SAkBhB,CAAC"}
|
|
@@ -176,7 +176,10 @@ export const useMessage = (conversationId, searchClientMsgID, enabled = true, us
|
|
|
176
176
|
return;
|
|
177
177
|
}
|
|
178
178
|
setLoadState((preState) => {
|
|
179
|
-
|
|
179
|
+
// sendTime is assigned once at creation (optimistic or server) and
|
|
180
|
+
// never changes afterwards, so sorting by it keeps messages in the
|
|
181
|
+
// right order regardless of network delay or how late seq comes back.
|
|
182
|
+
const messageList = [message, ...preState.messageList].sort((a, b) => (b.sendTime || 0) - (a.sendTime || 0));
|
|
180
183
|
return Object.assign(Object.assign({}, preState), { messageList });
|
|
181
184
|
});
|
|
182
185
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRevokeMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useRevokeMessage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useRevokeMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useRevokeMessage.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,mBAAmB,GAC9B,aAAa,MAAM,EACnB,iBAAiB,MAAM,SAoBxB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;CAkB5B,CAAC"}
|
|
@@ -1,11 +1,33 @@
|
|
|
1
|
+
import { MessageType } from "@openim/wasm-client-sdk";
|
|
1
2
|
import { DChatSDK } from "../../constants/sdk";
|
|
2
3
|
import { useRequest } from "ahooks";
|
|
4
|
+
import { updateOneMessage } from "../../hooks/message/useMessage";
|
|
5
|
+
import { fetchPinnedMessages } from "../../hooks/message/usePinnedMessages";
|
|
6
|
+
import useConversationStore from "../../store/conversation";
|
|
7
|
+
// Shared by the actor's own revoke call (conversationID known upfront) and by
|
|
8
|
+
// the OnNewRecvMessageRevoked socket handler (conversationID unknown, so we
|
|
9
|
+
// infer it from whichever conversation currently has this message pinned).
|
|
10
|
+
export const applyRevokedMessage = (clientMsgID, conversationID) => {
|
|
11
|
+
const revokedPatch = {
|
|
12
|
+
clientMsgID,
|
|
13
|
+
contentType: MessageType.RevokeMessage,
|
|
14
|
+
};
|
|
15
|
+
updateOneMessage(revokedPatch);
|
|
16
|
+
useConversationStore.getState().updatePinnedMessage(revokedPatch);
|
|
17
|
+
const { selectedConversationId, conversationData, pinnedMessageList } = useConversationStore.getState();
|
|
18
|
+
const targetConversationId = conversationID || selectedConversationId || (conversationData === null || conversationData === void 0 ? void 0 : conversationData.conversationID);
|
|
19
|
+
const isRevokedMessagePinned = pinnedMessageList.some((pinnedMessage) => pinnedMessage.clientMsgID === clientMsgID);
|
|
20
|
+
if (targetConversationId && isRevokedMessagePinned) {
|
|
21
|
+
void fetchPinnedMessages(targetConversationId);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
3
24
|
export const useRevokeMessage = () => {
|
|
4
25
|
const { loading, runAsync: revokeMessage } = useRequest(async (conversationID, clientMsgID) => {
|
|
5
26
|
await DChatSDK.revokeMessage({
|
|
6
27
|
conversationID,
|
|
7
28
|
clientMsgID,
|
|
8
29
|
});
|
|
30
|
+
applyRevokedMessage(clientMsgID, conversationID);
|
|
9
31
|
}, {
|
|
10
32
|
manual: true,
|
|
11
33
|
});
|
|
@@ -53,6 +53,9 @@
|
|
|
53
53
|
"context_menu_reply": "Trả lời",
|
|
54
54
|
"context_menu_pin": "Ghim",
|
|
55
55
|
"context_menu_unpin": "Bỏ ghim",
|
|
56
|
+
"context_menu_view_original": "Xem tin nhắn gốc",
|
|
57
|
+
"pinned_panel_title": "Tin nhắn đã ghim",
|
|
58
|
+
"pinned_panel_hint": "Nhấn giữ tin nhắn để chọn \"Bỏ ghim\" hoặc \"Xem tin nhắn gốc\"",
|
|
56
59
|
"pin_message_success": "Đã ghim tin nhắn",
|
|
57
60
|
"pin_message_failed": "Ghim tin nhắn thất bại",
|
|
58
61
|
"unpin_message_success": "Đã bỏ ghim tin nhắn",
|
|
@@ -72,6 +75,9 @@
|
|
|
72
75
|
"revoke_message_confirm_message": "Bạn có chắc chắn muốn thu hồi tin nhắn này?",
|
|
73
76
|
"revoke": "Thu hồi",
|
|
74
77
|
"revoked": "Đã thu hồi tin nhắn",
|
|
78
|
+
"revoked_with_sender": "{{name}} đã thu hồi tin nhắn",
|
|
79
|
+
"revoke_message_success": "Đã thu hồi tin nhắn",
|
|
80
|
+
"revoke_message_failed": "Thu hồi tin nhắn thất bại",
|
|
75
81
|
"manual_assign_search_placeholder": "Tìm kiếm",
|
|
76
82
|
"manual_assign_no_results": "Không có kết quả phù hợp",
|
|
77
83
|
"manual_assign_confirm_question": "Phân công lại cho <bold>{{name}}</bold>?",
|
|
@@ -95,7 +101,6 @@
|
|
|
95
101
|
"msg_type_image": "[Hình ảnh]",
|
|
96
102
|
"msg_type_voice": "[Tin nhắn thoại]",
|
|
97
103
|
"msg_type_file": "[Tập tin]",
|
|
98
|
-
"msg_type_link": "[Liên kết]",
|
|
99
104
|
"msg_type_video": "[Video]",
|
|
100
105
|
"msg_type_unsupported": "Tin nhắn không khả dụng",
|
|
101
106
|
"session_started": "Phiên chat đã bắt đầu",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/store/conversation.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAM3C,QAAA,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/store/conversation.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAM3C,QAAA,MAAM,oBAAoB,gFA6OvB,CAAC;AAEJ,eAAe,oBAAoB,CAAC"}
|
|
@@ -198,5 +198,11 @@ const useConversationStore = create((set, get) => ({
|
|
|
198
198
|
pinnedListIsEnd: isEnd,
|
|
199
199
|
});
|
|
200
200
|
},
|
|
201
|
+
updatePinnedMessage: (message) => {
|
|
202
|
+
set((state) => ({
|
|
203
|
+
pinnedMessageList: state.pinnedMessageList.map((pinnedMessage) => pinnedMessage.clientMsgID === message.clientMsgID
|
|
204
|
+
? Object.assign(Object.assign({}, pinnedMessage), message) : pinnedMessage),
|
|
205
|
+
}));
|
|
206
|
+
},
|
|
201
207
|
}));
|
|
202
208
|
export default useConversationStore;
|
package/dist/store/type.d.ts
CHANGED
|
@@ -69,6 +69,9 @@ export interface ConversationStore {
|
|
|
69
69
|
pinnedRemainingCount: number;
|
|
70
70
|
pinnedListIsEnd: boolean;
|
|
71
71
|
setPinnedMessageData: (messageList: MessageItem[], totalCount: number, remainingCount: number, isEnd: boolean) => void;
|
|
72
|
+
updatePinnedMessage: (message: Partial<MessageItem> & {
|
|
73
|
+
clientMsgID: string;
|
|
74
|
+
}) => void;
|
|
72
75
|
}
|
|
73
76
|
export interface IPersonalInfo {
|
|
74
77
|
fullName: string;
|
package/dist/store/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/store/type.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,aAAa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