Skip to content

Update invite models#3552

Merged
arqunis merged 1 commit into
serenity-rs:nextfrom
meditationmind:update-invite-models
May 16, 2026
Merged

Update invite models#3552
arqunis merged 1 commit into
serenity-rs:nextfrom
meditationmind:update-invite-models

Conversation

@meditationmind

@meditationmind meditationmind commented May 10, 2026

Copy link
Copy Markdown
Contributor

Updates invite-related models and endpoints to match the current API.

Fixes #3402.

The previous RichInvite (now InviteMetadata) essentially functioned as a different kind of invite, rather than the extension of Invite that it's meant to be, and this resulted in a deserialization error since the same endpoint could return two different types depending on permissions.

This PR fixes the issue by consolidating all invites as Invite and extending that with InviteMetadata. Many other discrepancies with the API have been patched up in the process. Also fixed a deserialization error related to including an embedded app target, which was likely simply never tested or encountered. role_ids has been added to the channel invite builder, to allow for assigning roles when an invite is accepted. I tested all of the above, as well as invites with scheduled event IDs, getting invite info while banned, group DM invites, and several other combinations.

I did not add the new target users endpoints.

This PR also pins nightly to 2026-05-05 in the Clippy and Docs workflows to address rust #156264. I'll revert these pins once #156284 is merged. nightly pins reverted.

@github-actions github-actions Bot added model Related to the `model` module. builder Related to the `builder` module. http Related to the `http` module. utils Related to the `utils` module. examples Related to Serenity's examples. ci Related to the continuous integration. labels May 10, 2026
@github-actions github-actions Bot removed the ci Related to the continuous integration. label May 13, 2026
@meditationmind

Copy link
Copy Markdown
Contributor Author

Reverted the nightly pins and moved the Clippy fixes to a separate PR.

@meditationmind
meditationmind force-pushed the update-invite-models branch from 811c5f4 to 6a93100 Compare May 13, 2026 20:08
@arqunis arqunis added enhancement An improvement to Serenity. breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users labels May 16, 2026
@arqunis
arqunis merged commit ae12915 into serenity-rs:next May 16, 2026
25 checks passed
@meditationmind
meditationmind deleted the update-invite-models branch May 17, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change The public API is changed, resulting in miscompilations or unexpected new behaviour for users builder Related to the `builder` module. enhancement An improvement to Serenity. examples Related to Serenity's examples. http Related to the `http` module. model Related to the `model` module. utils Related to the `utils` module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants