update upstream code
This commit is contained in:
@@ -42,7 +42,7 @@ pub async fn report_content(db: &Db, user: User, data: Json<DataReportContent>)
|
|||||||
let message = db.fetch_message(id).await?;
|
let message = db.fetch_message(id).await?;
|
||||||
|
|
||||||
// Users cannot report themselves
|
// Users cannot report themselves
|
||||||
if message.author == user.id {
|
if message.author.as_ref() == Some(&user.id) {
|
||||||
return Err(Error::CannotReportYourself);
|
return Err(Error::CannotReportYourself);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user