diff --git a/components/account/AccountHeader.vue b/components/account/AccountHeader.vue index 496327e6..cddc3c3b 100644 --- a/components/account/AccountHeader.vue +++ b/components/account/AccountHeader.vue @@ -44,17 +44,14 @@ function previewAvatar() { } async function toggleNotify() { - // @ts-expect-error: Masto.js only recently added this field. Can be removed when Elk updates Masto.js to 5.4.0 or higher. - relationship!.notifying = !relationship?.notifying + relationship!.notifying = !relationship!.notifying try { - // @ts-expect-error: Masto.js only recently added this field. Can be removed when Elk updates Masto.js to 5.4.0 or higher. - const newRel = await masto.v1.accounts.follow(account.id, { notify: relationship?.notifying }) + const newRel = await masto.v1.accounts.follow(account.id, { notify: relationship!.notifying }) Object.assign(relationship!, newRel) } catch { // TODO error handling - // @ts-expect-error: Masto.js only recently added this field. Can be removed when Elk updates Masto.js to 5.4.0 or higher. - relationship!.notifying = !relationship?.notifying + relationship!.notifying = !relationship!.notifying } } @@ -79,8 +76,6 @@ watchEffect(() => { }) const isSelf = $computed(() => currentUser.value?.account.id === account.id) -// @ts-expect-error: Masto.js only recently added this field. Can be removed when Elk updates Masto.js to 5.4.0 or higher. -const isAlertedOnPost = $computed(() => relationship?.notifying)