fix (client): clicking remote instance ticker on unsigned UI causes an API error

This commit is contained in:
naskya 2024-07-05 23:45:58 +09:00
parent 712257a376
commit e011455a25
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -58,6 +58,7 @@ import { userPage } from "@/filters/user";
import { i18n } from "@/i18n";
import { pageWindow } from "@/os";
import icon from "@/scripts/icon";
import { me, isSignedIn } from "@/me";
const props = defineProps<{
note: entities.Note;
@ -71,6 +72,8 @@ const showTicker =
function openServerInfo() {
if (!props.canOpenServerInfo || !defaultStore.state.openServerInfo) return;
if (props.note.user.host != null && !isSignedIn(me)) return;
const instanceInfoUrl =
props.note.user.host == null
? "/about"