fix: Switch to remove for unpinning

This commit is contained in:
Zomatree
2024-07-21 22:16:23 +01:00
parent d2f4823ceb
commit c50435d499
11 changed files with 69 additions and 18 deletions

View File

@@ -37,6 +37,7 @@ pub async fn clear_reactions(
reactions: Some(Default::default()),
..Default::default()
},
vec![]
)
.await
.map(|_| EmptyResponse)

View File

@@ -83,7 +83,7 @@ pub async fn edit(
partial.embeds = Some(new_embeds);
message.update(db, partial).await?;
message.update(db, partial, vec![]).await?;
// Queue up a task for processing embeds if the we have sufficient permissions
if permissions.has_channel_permission(ChannelPermission::SendEmbeds) {

View File

@@ -33,7 +33,7 @@ pub async fn message_pin(
message.update(db, PartialMessage {
pinned: Some(true),
..Default::default()
}).await?;
}, vec![]).await?;
Ok(EmptyResponse)
}

View File

@@ -33,7 +33,7 @@ pub async fn message_unpin(
message.update(db, PartialMessage {
pinned: Some(false),
..Default::default()
}).await?;
}, vec![FieldsMessage::Pinned]).await?;
Ok(EmptyResponse)
}