VoiceMessages: Improve permission check (#1544)

Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
Hugo C 2023-08-02 02:27:10 +02:00 committed by GitHub
parent 2e002107a6
commit 645749b5ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -220,7 +220,7 @@ function Modal({ modalProps }: { modalProps: ModalProps; }) {
}
const ctxMenuPatch: NavContextMenuPatchCallback = (children, props) => () => {
if (props.channel.guild_id && !PermissionStore.can(PermissionsBits.SEND_VOICE_MESSAGES, props.channel)) return;
if (props.channel.guild_id && !(PermissionStore.can(PermissionsBits.SEND_VOICE_MESSAGES, props.channel) && PermissionStore.can(PermissionsBits.SEND_MESSAGES, props.channel))) return;
children.push(
<Menu.MenuItem