mirror of
https://github.com/sim1222/misskey.git
synced 2025-04-29 10:47:35 +09:00
fix: return exception when no admin/mod
This commit is contained in:
parent
63b53b5096
commit
b54127eaa2
@ -14,6 +14,11 @@ export async function openReactionImportMenu(ev: MouseEvent, reaction: string):
|
|||||||
const isCustom = reaction.startsWith(':');
|
const isCustom = reaction.startsWith(':');
|
||||||
|
|
||||||
const getEmojiObject = (emojiId): Promise<Record<string, any> | null> => new Promise<Record<string, any> | null>(async resolve => {
|
const getEmojiObject = (emojiId): Promise<Record<string, any> | null> => new Promise<Record<string, any> | null>(async resolve => {
|
||||||
|
if (!($i?.isAdmin || $i?.isModerator)) {
|
||||||
|
resolve(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const sinceId = await os.api('admin/emoji/list', {
|
const sinceId = await os.api('admin/emoji/list', {
|
||||||
limit: 1,
|
limit: 1,
|
||||||
untilId: emojiId.id,
|
untilId: emojiId.id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user