From 5c38e6b824053a9d94e025f3836557acf8bbebad Mon Sep 17 00:00:00 2001
From: Mar0xy <marie@kaifa.ch>
Date: Sun, 12 Nov 2023 22:16:47 +0100
Subject: add: custom like emoji per instance, fix like

This fixes the fact that likes on mastodon didn't get federated properly and let's instance admins choose a custom emoji
---
 packages/frontend/src/components/MkNotes.vue | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'packages/frontend/src/components/MkNotes.vue')

diff --git a/packages/frontend/src/components/MkNotes.vue b/packages/frontend/src/components/MkNotes.vue
index 76587ce141..926c99143d 100644
--- a/packages/frontend/src/components/MkNotes.vue
+++ b/packages/frontend/src/components/MkNotes.vue
@@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
 				:ad="true"
 				:class="$style.notes"
 			>
-				<MkNote :key="note._featuredId_ || note._prId_ || note.id" :class="$style.note" :note="note"/>
+				<MkNote :key="note._featuredId_ || note._prId_ || note.id" :meta="meta" :class="$style.note" :note="note"/>
 			</MkDateSeparatedList>
 		</div>
 	</template>
@@ -33,11 +33,13 @@ SPDX-License-Identifier: AGPL-3.0-only
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue';
+import * as Misskey from 'misskey-js';
 import MkNote from '@/components/MkNote.vue';
 import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
 import MkPagination, { Paging } from '@/components/MkPagination.vue';
 import { i18n } from '@/i18n.js';
 import { infoImageUrl } from '@/instance.js';
+import * as os from '@/os.js';
 
 const props = defineProps<{
 	pagination: Paging;
@@ -45,6 +47,12 @@ const props = defineProps<{
 	disableAutoLoad?: boolean;
 }>();
 
+let meta = $ref<Misskey.entities.LiteInstanceMetadata>() as Misskey.entities.LiteInstanceMetadata;
+
+os.api('meta', { detail: false }).then(res => {
+	meta = res as unknown as Misskey.entities.LiteInstanceMetadata;
+});
+
 const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
 
 defineExpose({
-- 
cgit v1.2.3-freya

