refix: return exception when no admin/mod

This commit is contained in:
sim1222 2022-11-12 00:46:09 +09:00
parent b54127eaa2
commit c68ab5f229
No known key found for this signature in database
GPG Key ID: 04EF48D01BEB0298

View File

@ -45,6 +45,7 @@ export async function openReactionImportMenu(ev: MouseEvent, reaction: string):
const getEmojiId = async (): Promise<string | null> => {
if (isLocal) return null;
if (!host || !name) return null;
if (!($i?.isAdmin || $i?.isModerator)) return null;
const resList: Record<string, any>[] = await os.api('admin/emoji/list-remote', {
host,