Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview not available in thread channels #272

Closed
m1sk9 opened this issue Nov 11, 2024 · 1 comment · Fixed by #275
Closed

Preview not available in thread channels #272

m1sk9 opened this issue Nov 11, 2024 · 1 comment · Fixed by #275
Labels
C-bug Category: bug

Comments

@m1sk9
Copy link
Owner

m1sk9 commented Nov 11, 2024

When I send a message to a threaded channel, babyrite ignores the message. This has been happening since v0.11.0.

babyrite uses Serenity's GuildChannel#is_text_based method to validate the channel from which the message is sent, but apparently this method returns false for threaded channels.

babyrite/src/preview.rs

Lines 157 to 161 in 16aa0b3

if !channel.is_text_based() || channel.nsfw {
return Err(MessagePreviewError::ChannelError(
"Channel is not text-based or NSFW".to_string(),
));
}

https://github.com/serenity-rs/serenity/blob/7bc55b8321c639bb3a86135c71591e3cf6f79b64/src/model/channel/guild_channel.rs#L198-L207

I suspected a bug and asked a question on the official Serenity Discord. If it is confirmed to be a bug, I will patch it, but if it is not a bug, I will patch directly against babyrite.

@m1sk9 m1sk9 added the C-bug Category: bug label Nov 11, 2024
@m1sk9
Copy link
Owner Author

m1sk9 commented Nov 11, 2024

Submitted a patch to Serenity ( serenity-rs/serenity#3025 ). I will wait for a hotfix on Serenity's side.

@m1sk9 m1sk9 linked a pull request Nov 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant