Skip to content

user dialog-status: port the v1 read-state hotfix (d7e2724) to the v2 operation - #14

Merged
erfnzdeh merged 1 commit into
mainfrom
fix/port-dialog-status-read-state
Sep 4, 2026
Merged

user dialog-status: port the v1 read-state hotfix (d7e2724) to the v2 operation#14
erfnzdeh merged 1 commit into
mainfrom
fix/port-dialog-status-read-state

Conversation

@erfnzdeh

@erfnzdeh erfnzdeh commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Ports the v1 hotfix d7e2724 ("user dialog-status: report the peer's read state, always"), which landed on the production branch v2, into the v2 operation user dialog-status.

  • read_outbox_max_id, unread_count and top_message are now present on every return path (null when indeterminate, 0 on the definitive negative), so "have they read our message?" is answerable and a missing key can no longer be mistaken for "not read".
  • AGENT.md, CHANGELOG, generated reference and the compatibility test's key list updated; four new tests.

This was the only commit in 78a4934..origin/v2; nothing else needed porting.

Ports d7e2724 from v1. `messages.getPeerDialogs` already returns the whole
dialog object; the op read `top_message` off it and threw the rest away, so
the command could not answer "have they read our message?" — and answered it
wrongly by omission: the key was simply absent, so a caller reading it back
got null, which is indistinguishable from "not read". `chat list` reports the
same field, so the two routes disagreed about the same peer.

Adds read_outbox_max_id, unread_count and top_message to DialogStatus and to
every return path of the op, including the indeterminate one (null, since
ContactModel sets omit_defaults=False the keys are still emitted) and the
definitive negative (0). Deliberately no derived "they_read_it" boolean: that
comparison is only meaningful when the last message is ours, which only the
caller knows.

The three-valued contract, exit 13 and every existing key are untouched; the
peer-dialogs fake already carried all three fields, so only the tests moved.
@erfnzdeh
erfnzdeh merged commit 2b84df2 into main Sep 4, 2026
10 checks passed
@erfnzdeh
erfnzdeh deleted the fix/port-dialog-status-read-state branch September 4, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant