Prevent fetching messages from other channels. Change channel tag to channel_type.

This commit is contained in:
Paul Makles
2021-01-19 19:54:37 +00:00
parent 3a63d502d9
commit 5ab329dfdd
5 changed files with 11 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ pub async fn req(user: User, target: Ref, msg: Ref) -> Result<()> {
Err(Error::LabelMe)?
}
let message = msg.fetch_message().await?;
let message = msg.fetch_message(&channel).await?;
if message.author != user.id && !perm.get_manage_messages() {
match channel {
Channel::SavedMessages { .. } => unreachable!(),