mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-14 21:09:58 +00:00
feat: show followers from account's instance
This commit is contained in:
parent
5ffb96baf6
commit
7d987cd49d
1 changed files with 14 additions and 0 deletions
|
@ -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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue