tangled
alpha
login
or
join now
flo-bit.dev
/
blento
22
fork
atom
your personal website on atproto - mirror
blento.app
22
fork
atom
overview
issues
1
pulls
pipelines
fix invalid handle
Florian
1 month ago
02917554
cf7ab30f
+14
-2
2 changed files
expand all
collapse all
unified
split
src
lib
atproto
methods.ts
cards
SpecialCards
UpdatedBlentos
index.ts
+5
-1
src/lib/atproto/methods.ts
···
93
93
params: { actor: data.did }
94
94
});
95
95
96
96
-
if (!response.ok) return;
96
96
+
if (!response.ok || response.data.handle === 'handle.invalid') {
97
97
+
// fall back to describe repo
98
98
+
const repo = await describeRepo({ did: data.did, client: data.client });
99
99
+
return { handle: repo?.handle ?? 'handle.invalid', did: data.did };
100
100
+
}
97
101
98
102
return response.data;
99
103
}
+9
-1
src/lib/cards/SpecialCards/UpdatedBlentos/index.ts
···
30
30
for (const did of Array.from(uniqueDids)) {
31
31
const profile = getDetailedProfile({ did });
32
32
profiles.push(profile);
33
33
-
if (profiles.length > 20) break;
33
33
+
if (profiles.length > 30) break;
34
34
+
}
35
35
+
36
36
+
for (let i = existingUsersArray.length - 1; i >= 0; i--) {
37
37
+
// if handle is handle.invalid, remove from existing users and add to profiles to refresh
38
38
+
if (existingUsersArray[i].handle === 'handle.invalid') {
39
39
+
const removed = existingUsersArray.splice(i, 1)[0];
40
40
+
profiles.push(getDetailedProfile({ did: removed.did }));
41
41
+
}
34
42
}
35
43
36
44
const result = [...(await Promise.all(profiles)), ...existingUsersArray];