272c6acd31b842826b8bf5fe838dd1e6c53bf3a6
Two independent defects; either alone caused it, in DMs, groups and channels. 1. useMessages reported a read of the newest NON-PENDING message regardless of author. Sending therefore made the client immediately mark its own message read, the server echoed a receipt for it, and the sender's bubble showed "Seen" before anyone had opened the thread. You do not read your own message: lastReadableId now skips your own. 2. The guard meant to catch exactly this — `e.actorId !== currentActorId` — could never fire: the receipt carries the reader's IIOS actor UUID while clients hold a userId, so the comparison was always true and every receipt, including your own, counted as the other side. The gateway now also emits userId on READ and DELIVERED receipts (matching what `annotation` already did), and ReceiptEvent carries it as optional so older servers still typecheck. MockAdapter.markRead was a no-op, so it could not exercise any of this; it now echoes a receipt like a real server. Regression test verified to fail without the fix. SDK 0.1.14; suite 17 files / 101 tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Description
No description provided
Languages
TypeScript
88.8%
JavaScript
10.4%
Dockerfile
0.4%
HTML
0.3%
Shell
0.1%