1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-09 09:26:22 +00:00

Single line return condition

This commit is contained in:
jamesbt365 2024-10-04 13:11:50 +01:00
parent 8cac0dc60b
commit 16ee616027
No known key found for this signature in database
GPG key ID: B375A092448F9102

View file

@ -36,9 +36,7 @@ const messageContextMenuPatch: NavContextMenuPatchCallback = (children, { channe
(snapshot: Snapshot) => snapshot?.message.embeds.length
);
if (!isEmbedSuppressed && !embeds.length && !hasEmbedsInSnapshots) {
return;
}
if (!isEmbedSuppressed && !embeds.length && !hasEmbedsInSnapshots) return;
const hasEmbedPerms = channel.isPrivate() || !!(PermissionStore.getChannelPermissions({ id: channel.id }) & PermissionsBits.EMBED_LINKS);
if (author.id === UserStore.getCurrentUser().id && !hasEmbedPerms) return;