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:
parent
a0408f12eb
commit
70ff143c36
@ -38,11 +38,12 @@ function MessageContextMenu({ message }: MenuProps) {
|
|||||||
Copy Raw Text
|
Copy Raw Text
|
||||||
</ContextMenuButton>
|
</ContextMenuButton>
|
||||||
<ContextMenuDivider />
|
<ContextMenuDivider />
|
||||||
{message.channel.hasPermission("MANAGE_MESSAGES") && message instanceof Message && (
|
{(message.channel.hasPermission("MANAGE_MESSAGES") || message.author.id === app.account?.id) &&
|
||||||
<ContextMenuButton icon="mdiDelete" destructive onClick={deleteMessage}>
|
message instanceof Message && (
|
||||||
Delete Message
|
<ContextMenuButton icon="mdiDelete" destructive onClick={deleteMessage}>
|
||||||
</ContextMenuButton>
|
Delete Message
|
||||||
)}
|
</ContextMenuButton>
|
||||||
|
)}
|
||||||
<ContextMenuDivider />
|
<ContextMenuDivider />
|
||||||
<ContextMenuButton
|
<ContextMenuButton
|
||||||
icon="mdiIdentifier"
|
icon="mdiIdentifier"
|
||||||
|
Loading…
Reference in New Issue
Block a user