Repository navigation
Add chat_channel_invite() - #26
Merged
Merged
Conversation
Invites a user to a channel: the other side of the invitations chat_poll() reports. Matrix implements it over mx.api::mx_room_invite() with an .invite testing seam; the loopback adapter records the invitation, which is what a consumer's test asserts on; Slack, Telegram and IRC report channel_invite = FALSE and the default method errors with the capability to check, like the other gated verbs. A consumer filing rooms under a space falls back to a direct invite when restricted join rules cannot be written, and the contract had no verb for that.
TroyHernandez
added a commit
to cornball-ai/drat
that referenced
this pull request
Oct 21, 2026
Built from main after cornball-ai/chat.api#26 (chat_channel_invite()).
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.
chat_channel_invite(client, channel, user)invites a user to a channel: the other side of the invitationschat_poll()reports.A consumer that files rooms under a space falls back to a direct invite when the restricted join rules cannot be written (room version < 9), and the contract had no verb for that, so it was dropping down to
mx.apidirectly.mx.api::mx_room_invite(), with an.invitetesting seam onchat_matrix(). Errors propagate, as for join and leave.client$env$invites; the record is what a consumer's test asserts on.chat_capabilities()$channel_invite: TRUE for Matrix and loopback, FALSE for Slack, Telegram and IRC. The every-adapter capability test covers the new flag.mx_room_invite()'s order; a refused invitation propagates).Version 0.1.0.2.