Skip to content

Commit

Permalink
Let admin/mod manage emotes
Browse files Browse the repository at this point in the history
  • Loading branch information
Excellify committed Jun 12, 2024
1 parent b08e88d commit bb5ef22
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/composable/useSetMutation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { computed, reactive, watch } from "vue";
import { Logger } from "@/common/Logger";
import { SevenTVRoles } from "@/common/Roles";
import { changeEmoteInSetMutation } from "@/assets/gql/seventv.user.gql";
import { useChannelContext } from "./channel/useChannelContext";
import { useChatEmotes } from "./chat/useChatEmotes";
Expand Down Expand Up @@ -48,6 +49,7 @@ export function useSetMutation(setID?: string): SetMutation {
const canEditIfLoggedIn = computed(() => {
if (!actor.user) return false;
if (ctx.id == actor.platformUserID) return true;
if (actor.user.roles?.some((r) => r in [SevenTVRoles.MODERATOR, SevenTVRoles.ADMIN])) return true;
return (ctx.user?.editors ?? []).some((e) => e.id == actor.user?.id);
});

Expand Down

0 comments on commit bb5ef22

Please sign in to comment.