Commit 4580aed9 authored by Luna's avatar Luna 📟

channel.messages: simplify delete_message's check

parent dd3dbf5a
......@@ -314,7 +314,8 @@ async def delete_message(channel_id, message_id):
by_ownership = author_id == user_id
if not by_perm and not by_ownership:
can_delete = by_perm or by_ownership
if not can_delete:
raise Forbidden('You can not delete this message')
await app.db.execute("""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment