Compare commits

...

1 commit

Author SHA1 Message Date
Shinigami92
7d987cd49d feat: show followers from account's instance 2023-05-05 21:05:09 +02:00

View file

@ -14,6 +14,20 @@ if (account) {
useHydratedHead({ useHydratedHead({
title: () => `${t('account.following')} | ${getDisplayName(account)} (@${account.acct})`, title: () => `${t('account.following')} | ${getDisplayName(account)} (@${account.acct})`,
}) })
const currentUserInstance = currentUser.value?.account.url.split('/@')[0]
const accountInstance = account.url.split('/@')[0]
if (currentUserInstance !== accountInstance) {
const otherMasto = createMasto()
otherMasto.setParams({ url: accountInstance })
const otherAccount = await otherMasto.client.value.v1.accounts.lookup({ acct: account.acct })
const otherPaginator = otherMasto.client.value.v1.accounts.listFollowing(otherAccount.id, {})
console.log((await otherPaginator.next()).value)
}
} }
</script> </script>