fix(onebot): correct private message history (#256)

Use the C2C roam cursor and canonical NT sequence for bidirectional history. Persist direction-aware recall tombstones so recalled messages cannot reappear.
This commit is contained in:
DrSmoothl committed 2026-07-20 22:25:13 +08:00
1 parent 88216ce644
commit 4aa2cd1693
37 files changed
+1853 -242

No files matched your search

+4 -6
View File
@@ -222,11 +222,9 @@ export interface SrcMsg {
troopName?: pb<11, bytes>;
}
// Decoded content of SrcMsg.pbReserve(8). For a c2c (friend) reply the
// canonical replied-to sequence lives here as `friendSequence`, NOT in
// `origSeqs` (which carries the per-sender clientSequence). Lagrange resolves an
// incoming reply as `Sequence = reserve.FriendSequence ?? OrigSeqs[0]`
// (dev/Lagrange.Core/.../SourceMsg.PbPreserve.cs ProtoMember(8)).
// Decoded content of SrcMsg.pbReserve(8). `friendSequence` is a friendship-side
// counter observed in QQNT, not the conversation-wide C2C NT message sequence;
// private reply resolution therefore uses SrcMsg.origSeqs plus direction/time.
export interface SrcMsgPbReserve {
receiverUid?: pb<7, string>;
friendSequence?: pb<8, uint_32>;
@@ -436,4 +434,4 @@ export interface Preserve {
senderUid?: pb<6, string>;
receiverUid?: pb<7, string>;
clientSequence?: pb<8, uint_32>;
}
}