fix(friend): verify and synchronize remark updates
Validate the service result before reporting friend remark changes as successful. Rejected, incomplete, or contradictory confirmations now reach callers instead of being reported as completed. Keep confirmed remarks synchronized in the identity cache and consume cross-client remark updates without exposing a new OneBot event. Local cache failures remain observable without turning an already completed remote change into a retryable failure. Preserve friend remarks exactly across restarts and add request, response, persistence, receive-pipeline, and action-level regression coverage. Fixes #303.
This commit is contained in:
17 files changed
+511
-18
No files matched your search
@@ -526,6 +526,18 @@ export interface OnlineDevicesChangedEvent extends QQEvent {
|
||||
devices: OnlineDeviceInfo[];
|
||||
}
|
||||
|
||||
/**
|
||||
* A friend or stranger remark changed on another client (Event 0x210 /
|
||||
* subType 364). Internal-only: the packet pipeline consumes this event to
|
||||
* keep the identity cache synchronized; it is not forwarded to OneBot.
|
||||
*/
|
||||
export interface FriendRemarkChangedEvent extends QQEvent {
|
||||
kind: 'friend_remark_changed';
|
||||
userUid: string;
|
||||
userUin: number;
|
||||
remark: string;
|
||||
}
|
||||
|
||||
export type QQEventVariant =
|
||||
| FriendMessage
|
||||
| GroupMessage
|
||||
@@ -551,4 +563,5 @@ export type QQEventVariant =
|
||||
| GroupTitleChangeEvent
|
||||
| FriendProfileLikeEvent
|
||||
| OnlineDevicesChangedEvent
|
||||
| FriendRemarkChangedEvent
|
||||
| BotOfflineEvent;
|
||||
Reference in new issue
Block a user