aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/permissionsViewer/index.tsx
diff options
context:
space:
mode:
authorNuckyz <61953774+Nuckyz@users.noreply.github.com>2023-05-19 21:24:56 -0300
committerGitHub <noreply@github.com>2023-05-20 02:24:56 +0200
commitec091a79591cf9619dd589102f5b338827b70ad8 (patch)
treebbb7f56689a4ef399d5ef67cfda68d6f97a2b1db /src/plugins/permissionsViewer/index.tsx
parent89a6c575c9cfe6a6fa72def404220817e008cfea (diff)
downloadVencord-ec091a79591cf9619dd589102f5b338827b70ad8.tar.gz
Vencord-ec091a79591cf9619dd589102f5b338827b70ad8.tar.bz2
Vencord-ec091a79591cf9619dd589102f5b338827b70ad8.zip
Fix SHC broken patches; Sort PermViewer channel overwrites roles (#1166)
Diffstat (limited to 'src/plugins/permissionsViewer/index.tsx')
-rw-r--r--src/plugins/permissionsViewer/index.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/permissionsViewer/index.tsx b/src/plugins/permissionsViewer/index.tsx
index 208fef3..480efc1 100644
--- a/src/plugins/permissionsViewer/index.tsx
+++ b/src/plugins/permissionsViewer/index.tsx
@@ -27,7 +27,7 @@ import type { Guild, GuildMember } from "discord-types/general";
import openRolesAndUsersPermissionsModal, { PermissionType, RoleOrUserPermission } from "./components/RolesAndUsersPermissions";
import UserPermissions from "./components/UserPermissions";
-import { getSortedRoles } from "./utils";
+import { getSortedRoles, sortPermissionOverwrites } from "./utils";
export const enum PermissionsSortOrder {
HighestRole,
@@ -94,12 +94,12 @@ function MenuItem(guildId: string, id?: string, type?: MenuItemParentType) {
case MenuItemParentType.Channel: {
const channel = ChannelStore.getChannel(id!);
- permissions = Object.values(channel.permissionOverwrites).map(({ id, allow, deny, type }) => ({
+ permissions = sortPermissionOverwrites(Object.values(channel.permissionOverwrites).map(({ id, allow, deny, type }) => ({
type: type as PermissionType,
id,
overwriteAllow: allow,
overwriteDeny: deny
- }));
+ })), guildId);
header = channel.name;