fix(core): verify conversation read updates
Replace message-header sequence forwarding with a server-guided read flow for group and private conversations. Batch read reports conservatively, validate per-conversation results and cursor advancement, and fail with actionable errors when the server does not apply an update. Add regression coverage for mixed batches, pagination, already-current sessions, malformed responses, and private sequence-domain mismatches.
This commit is contained in:
5 files changed
+456
-51
No files matched your search
@@ -27,6 +27,7 @@ export interface MockMessageApi {
|
||||
recallPrivate: ReturnType<typeof vi.fn>;
|
||||
markGroupRead: ReturnType<typeof vi.fn>;
|
||||
markPrivateRead: ReturnType<typeof vi.fn>;
|
||||
markAllRead: ReturnType<typeof vi.fn>;
|
||||
}
|
||||
|
||||
export function mockMessageApi(): MockMessageApi {
|
||||
@@ -38,6 +39,7 @@ export function mockMessageApi(): MockMessageApi {
|
||||
recallPrivate: vi.fn(async () => undefined),
|
||||
markGroupRead: vi.fn(async () => undefined),
|
||||
markPrivateRead: vi.fn(async () => undefined),
|
||||
markAllRead: vi.fn(async () => undefined),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user