summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/get-appear-note.ts
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2024-08-17 11:28:22 +0900
committerGitHub <noreply@github.com>2024-08-17 11:28:22 +0900
commit059eb6d379cc84ee48c76bcea88dd90423f4f929 (patch)
tree484f0274242d7013e6feaa6e5860f11e3d00ede6 /packages/frontend/src/scripts/get-appear-note.ts
parentNew Crowdin updates (#14393) (diff)
downloadsharkey-059eb6d379cc84ee48c76bcea88dd90423f4f929.tar.gz
sharkey-059eb6d379cc84ee48c76bcea88dd90423f4f929.tar.bz2
sharkey-059eb6d379cc84ee48c76bcea88dd90423f4f929.zip
fix(frontend): リノートの判定が甘いのを修正 (#14396)
* fix(frontend): リノートの判定が甘いのを修正 * fix * Update Changelog * fix * use type assertion * fix + add comments * lint * misskey-jsに移動 * PureRenote -> Renote * isRenote -> isPureRenote
Diffstat (limited to 'packages/frontend/src/scripts/get-appear-note.ts')
-rw-r--r--packages/frontend/src/scripts/get-appear-note.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/frontend/src/scripts/get-appear-note.ts b/packages/frontend/src/scripts/get-appear-note.ts
new file mode 100644
index 0000000000..40ce80eac9
--- /dev/null
+++ b/packages/frontend/src/scripts/get-appear-note.ts
@@ -0,0 +1,10 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+import * as Misskey from 'misskey-js';
+
+export function getAppearNote(note: Misskey.entities.Note) {
+ return Misskey.note.isPureRenote(note) ? note.renote : note;
+}