Frontend: Fixed note renote detection

This commit is contained in:
Natty 2023-11-09 16:34:41 +01:00
parent 7eb03d59fb
commit 10256c683c
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
1 changed files with 2 additions and 6 deletions

View File

@ -78,7 +78,7 @@ import * as os from "@/os";
import { definePageMetadata } from "@/scripts/page-metadata";
import { i18n } from "@/i18n";
import { endpoints, packed } from "magnetar-common";
import { magTransUsername } from "@/scripts-mag/mag-util";
import { magIsRenote, magTransUsername } from "@/scripts-mag/mag-util";
const props = defineProps<{
noteId: string;
@ -133,11 +133,7 @@ function fetchNote() {
)
.then((res) => {
note = res;
isRenote =
note.renoted_note_id != null &&
note.text == null &&
note.file_ids.length === 0 &&
note.poll == null;
isRenote = magIsRenote(note);
appearNote = isRenote
? (note.renoted_note as packed.PackNoteMaybeFull)
: note;