wip
This commit is contained in:
parent
167a7201c2
commit
e0cea2facc
@ -39,7 +39,7 @@ const url = computed(() => {
|
||||
const alt = computed(() => customEmoji.value ? `:${customEmoji.value.name}:` : char.value);
|
||||
|
||||
const onContextmenu = (e: MouseEvent) => {
|
||||
openReactionImportMenu(e, props.emoji);
|
||||
openReactionImportMenu(e, customEmoji.value?.id ?? props.emoji);
|
||||
};
|
||||
|
||||
</script>
|
||||
|
@ -90,7 +90,7 @@ export async function openReactionImportMenu(ev: MouseEvent, reaction: string) {
|
||||
});
|
||||
},
|
||||
}];
|
||||
const emojiId = await getEmojiId(reaction);
|
||||
const emojiId = await getEmojiId(reaction)? await getEmojiId(reaction) : reaction;
|
||||
if (reaction.startsWith(':') && emojiId) {
|
||||
menuItems.push({
|
||||
type: 'button',
|
||||
@ -99,7 +99,9 @@ export async function openReactionImportMenu(ev: MouseEvent, reaction: string) {
|
||||
action: async () => {
|
||||
const duplication: boolean = await os.api('meta').then(meta => {
|
||||
const emojis = meta.emojis;
|
||||
return emojis.some(emoji => emoji.name === reaction.match(/(?<=:).*(?=@.*\.*(?=:))/g)[0]);
|
||||
return emojis.some((emoji) => {
|
||||
return (emoji.name === reaction.match(/(?<=:).*(?=@.*\.*(?=:))/g)[0]);
|
||||
});
|
||||
});
|
||||
|
||||
console.log(await duplication);
|
||||
|
Loading…
x
Reference in New Issue
Block a user