Add chat_set_state() for durable typed channel state - #15
Merged
Merged
Conversation
A capability-gated setter for channel-scoped metadata: a Matrix state event on the Matrix adapter, an in-memory keyed store on loopback so consumers can round-trip it in tests, and a refusal everywhere else (set_state = FALSE on Slack and IRC). The Matrix method follows the channel_create pattern: injectable .state seam, mx.api::mx_set_state default, errors propagate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A capability-gated setter for channel-scoped metadata: a Matrix state event on the Matrix adapter, an in-memory keyed store on loopback so consumers can round-trip it in tests, and a refusal everywhere else (set_state = FALSE on Slack and IRC). The Matrix method follows the channel_create pattern: injectable .state seam, mx.api::mx_set_state default, errors propagate.
Motivation: a bot marking a room's lifecycle (e.g. a reversed-domain state event a client keys UI off) currently has no path to Matrix state through the contract, and chat_channel_create's own docs argue that gaps like this force consumers below the seam.
Note: the version bump is 0.0.1.22 off main (0.0.1.21); the unmerged slack-lifecycle branch also carries a .22, so whichever merges second rebases its bump.