Merge branch 'master' into webhooks

This commit is contained in:
Angelo Kontaxis
2023-04-01 22:52:11 +01:00
committed by GitHub
71 changed files with 1173 additions and 428 deletions

View File

@@ -385,7 +385,7 @@ impl SendableEmbed {
impl BulkMessageResponse {
pub async fn transform(
db: &Database,
channel: &Channel,
channel: Option<&Channel>,
messages: Vec<Message>,
include_users: Option<bool>,
) -> Result<BulkMessageResponse> {
@@ -394,7 +394,8 @@ impl BulkMessageResponse {
let users = User::fetch_foreign_users(db, &user_ids).await?;
Ok(match channel {
Channel::TextChannel { server, .. } | Channel::VoiceChannel { server, .. } => {
Some(Channel::TextChannel { server, .. })
| Some(Channel::VoiceChannel { server, .. }) => {
BulkMessageResponse::MessagesAndUsers {
messages,
users,