From aca5f8609b7f080f3434a42583453c8df9064f75 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 25 Sep 2026 22:21:56 +0800 Subject: [PATCH] Fix misleading "clear chat history" confirmation copy The dialog said clearing was "local record only" -- reading the real backend handler (im_be's Topic.replyDelMsg) shows a soft delete persists a per-account delete watermark server-side, visible across every device/session on that account and not reversible through any normal client action. Only the "doesn't affect the other party" half of the old copy was accurate. Updated both the P2P and group versions to say what actually happens. Co-Authored-By: Claude Sonnet 5 --- web/src/features/groups/GroupDetailColumn.tsx | 11 ++++++++++- web/src/features/messages/DetailColumn.tsx | 14 +++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/web/src/features/groups/GroupDetailColumn.tsx b/web/src/features/groups/GroupDetailColumn.tsx index b24acde5..4ab6b416 100644 --- a/web/src/features/groups/GroupDetailColumn.tsx +++ b/web/src/features/groups/GroupDetailColumn.tsx @@ -214,7 +214,16 @@ export function GroupDetailColumn({ topicId, peerName, onClose, onOpenHistory }: }); const clearHistory = async () => { - if (!(await requestConfirm({ message: '确定清空本群的聊天记录吗?此操作仅清除本地记录,不影响其他成员。', danger: true }))) return; + // See DetailColumn.tsx's identical clearHistory for why this copy changed: a soft delete + // (`delMessagesAll(false)`) is a real, per-account server watermark (im_be's Topic.replyDelMsg), + // not a local-only cache wipe a refresh or another device would undo. + if ( + !(await requestConfirm({ + message: '确定清空本群的聊天记录吗?清空后,你的账号(含其他设备)将无法再看到这些消息,且无法恢复;不影响其他成员。', + danger: true, + })) + ) + return; try { await tinode.getTopic(topicId).delMessagesAll(false); } catch (err) { diff --git a/web/src/features/messages/DetailColumn.tsx b/web/src/features/messages/DetailColumn.tsx index c7e036d5..fcd5d8d8 100644 --- a/web/src/features/messages/DetailColumn.tsx +++ b/web/src/features/messages/DetailColumn.tsx @@ -160,7 +160,19 @@ export function DetailColumn({ topicId, peerName, onClose, onOpenHistory }: Deta }); const clearHistory = async () => { - if (!(await requestConfirm({ message: '确定清空与该联系人的聊天记录吗?此操作仅清除本地记录,不影响对方。', danger: true }))) return; + // The old copy here ("此操作仅清除本地记录") was actively misleading -- confirmed by reading + // the real backend handler (im_be's Topic.replyDelMsg): a soft delete (`hardDel=false`, what + // `delMessagesAll(false)` sends) is NOT a browser-local cache wipe a refresh would undo. The + // server records a per-account delete watermark (`t.perUser[asUid].delID`) that persists across + // every device/session on this account and isn't reversible through any normal client action -- + // only "does it affect the other party" (no) was actually true about the old wording. + if ( + !(await requestConfirm({ + message: '确定清空与该联系人的聊天记录吗?清空后,你的账号(含其他设备)将无法再看到这些消息,且无法恢复;不影响对方。', + danger: true, + })) + ) + return; tinode.getTopic(topicId).delMessagesAll(false); };