fix(onebot): deduplicate client group self-message reports

Prevent repeated reports for client-originated group messages while preserving distinct sends and existing private-message behavior.

Cover opt-in reporting, message formats, account isolation, and repeated delivery.

Refs #528
This commit is contained in:
DrSmoothl committed 2026-10-21 14:43:37 +08:00
1 parent 5cd4ae61dd
commit 3a4c1eeea2
4 files changed
+216 -18

No files matched your search

+2 -2
View File
@@ -3,8 +3,8 @@ import type { JsonObject } from './types';
export const SELF_SENT_ECHO_WINDOW_MS = 120_000;
/**
* Match the action-side copy of a sent message with QQ's later canonical
* echo. The message hash alone is insufficient because it is a signed 32-bit
* Match a reported self send with a later QQ echo, including repeated group
* pushes. The message hash alone is insufficient because it is a signed 32-bit
* value and can collide; sequence, conversation and a bounded time window are
* part of the identity as well.
*/