Skip to content

Preserve bot ownership, channel rights, and custom verification across responses - #180

Merged
iamxvbaba merged 2 commits into
iamxvbaba:mainfrom
xirogram:codex/upstream-peer-permissions
Nov 17, 2026
Merged

iamxvbaba merged 2 commits into
iamxvbaba:mainfrom
xirogram:codex/upstream-peer-permissions

Conversation

@clockerka

Copy link
Copy Markdown
Contributor

Peer objects returned with message histories and updates could replace client-cached bot ownership, channel administrator rights, and custom verification flags with incomplete state. Opening the profile would restore the flags until another response arrived.

This change finalizes user/chat identity decorations at the canonical RPC response boundary, including user vectors and peer-bearing envelopes. Shared response/push helpers project bot ownership for the actual viewer, using batched profile loading when available. Bot management is never granted to other viewers.

Bot users with unknown ownership and channel rows without viewer membership use minimal peer objects. Full linked-channel updates required to clear disabled direct-message links resolve the recipient's membership before including permissions; monoforums retain their special full-state projection.

Wire-roundtrip regression tests cover alternating owner/stranger responses, users/messages/updates envelopes, supplemental channel verification, and minimal versus complete channel permissions.

Validation on this upstream-based branch with Go 1.26.11:

  • go test ./... -count=1
  • go vet ./internal/rpc
  • git diff --check

PostgreSQL-dependent and live Compose tests were skipped locally because their services are unavailable.

Ported from xirogram#8 onto this repository's current main branch; no fork-specific schema, custom banner RPCs, or dependency replacement is included.

Copilot AI balanced review requested due to automatic review settings November 16, 2026 19:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@iamxvbaba
iamxvbaba merged commit 18511c2 into iamxvbaba:main Nov 17, 2026
4 checks passed
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.

3 participants