Don't call familiar_followers if not same instance as logged-in instance

pull/228/head
Lim Chee Aun 2023-09-23 22:38:29 +08:00
rodzic 4c3666df6a
commit 7ba5ee5fe2
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -73,6 +73,11 @@ function AccountInfo({
[account?.id],
);
const sameCurrentInstance = useMemo(
() => instance === api().instance,
[instance],
);
useEffect(() => {
if (!isString) {
setInfo(account);
@ -141,6 +146,7 @@ function AccountInfo({
}
const results = await followersIterator.current.next();
if (isSelf) return results;
if (!sameCurrentInstance) return results;
const { value } = results;
let newValue = [];