1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-27 14:28:53 +09:00
This commit is contained in:
NoriDev 2024-08-21 10:12:36 +09:00
parent 56a0832913
commit 710e37bc4a

View File

@ -66,6 +66,12 @@ const reactionName = computed(() => {
return r.slice(0, r.indexOf('@'));
});
const reactionHost = computed(() => {
const r = props.reaction.replace(':', '');
const host = r.slice(r.indexOf('@') + 1);
return host.endsWith('.') ? host.slice(0, -1) : host;
});
const alternative: ComputedRef<string | null> = computed(() => defaultStore.state.reactableRemoteReactionEnabled ? (customEmojis.value.find(it => it.name === reactionName.value)?.name ?? null) : null);
async function toggleReaction(ev: MouseEvent) {
@ -131,7 +137,7 @@ function stealReaction(ev: MouseEvent) {
action: async () => {
await os.apiWithDialog('admin/emoji/steal', {
name: reactionName.value,
host: props.note.user.host,
host: reactionHost.value,
});
},
}, {
@ -140,7 +146,7 @@ function stealReaction(ev: MouseEvent) {
action: async () => {
await os.apiWithDialog('admin/emoji/steal', {
name: reactionName.value,
host: props.note.user.host,
host: reactionHost.value,
});
await misskeyApi('notes/reactions/create', {