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 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-09-25 22:21:56 +08:00
co-authored by Claude Sonnet 5
parent 1cc6f5068a
commit aca5f8609b
2 changed files with 23 additions and 2 deletions
+10 -1
View File
@@ -214,7 +214,16 @@ export function GroupDetailColumn({ topicId, peerName, onClose, onOpenHistory }:
}); });
const clearHistory = async () => { 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 { try {
await tinode.getTopic(topicId).delMessagesAll(false); await tinode.getTopic(topicId).delMessagesAll(false);
} catch (err) { } catch (err) {
+13 -1
View File
@@ -160,7 +160,19 @@ export function DetailColumn({ topicId, peerName, onClose, onOpenHistory }: Deta
}); });
const clearHistory = async () => { 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); tinode.getTopic(topicId).delMessagesAll(false);
}; };