Frontend: Fixed note renote detection
This commit is contained in:
parent
7eb03d59fb
commit
10256c683c
|
@ -78,7 +78,7 @@ import * as os from "@/os";
|
||||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { endpoints, packed } from "magnetar-common";
|
import { endpoints, packed } from "magnetar-common";
|
||||||
import { magTransUsername } from "@/scripts-mag/mag-util";
|
import { magIsRenote, magTransUsername } from "@/scripts-mag/mag-util";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
noteId: string;
|
noteId: string;
|
||||||
|
@ -133,11 +133,7 @@ function fetchNote() {
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
note = res;
|
note = res;
|
||||||
isRenote =
|
isRenote = magIsRenote(note);
|
||||||
note.renoted_note_id != null &&
|
|
||||||
note.text == null &&
|
|
||||||
note.file_ids.length === 0 &&
|
|
||||||
note.poll == null;
|
|
||||||
appearNote = isRenote
|
appearNote = isRenote
|
||||||
? (note.renoted_note as packed.PackNoteMaybeFull)
|
? (note.renoted_note as packed.PackNoteMaybeFull)
|
||||||
: note;
|
: note;
|
||||||
|
|
Loading…
Reference in New Issue