1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-22 02:12:38 +01:00

fix not being able to delete own message

This commit is contained in:
Puyodead1 2023-12-22 17:57:55 -05:00
parent a0408f12eb
commit 70ff143c36
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC

View File

@ -38,11 +38,12 @@ function MessageContextMenu({ message }: MenuProps) {
Copy Raw Text
</ContextMenuButton>
<ContextMenuDivider />
{message.channel.hasPermission("MANAGE_MESSAGES") && message instanceof Message && (
<ContextMenuButton icon="mdiDelete" destructive onClick={deleteMessage}>
Delete Message
</ContextMenuButton>
)}
{(message.channel.hasPermission("MANAGE_MESSAGES") || message.author.id === app.account?.id) &&
message instanceof Message && (
<ContextMenuButton icon="mdiDelete" destructive onClick={deleteMessage}>
Delete Message
</ContextMenuButton>
)}
<ContextMenuDivider />
<ContextMenuButton
icon="mdiIdentifier"