{#if account.avatarCid}
-

+
+ {#if statusEmoji}
+ {statusEmoji}
+ {/if}
+
+
{account.displayName || account.handle || account.did}
{:else}
-

+
+ {#if statusEmoji}
+ {statusEmoji}
+ {/if}
+
+
+
{account.displayName || account.handle || account.did}
@@ -40,5 +55,6 @@
diff --git a/src/lib/pdsfetch.ts b/src/lib/pdsfetch.ts
index ce662d2..a0232aa 100644
--- a/src/lib/pdsfetch.ts
+++ b/src/lib/pdsfetch.ts
@@ -407,6 +407,25 @@ const getTealNowListeningTo = async (did: At.Did) => {
return null;
}
+type statusSphere = {
+ status: string;
+}
+
+const getStatusSphere = async (did: At.Did) => {
+ const { data } = await rpc.get("com.atproto.repo.listRecords", {
+ params: {
+ repo: did as At.Identifier,
+ collection: "xyz.statusphere.status",
+ limit: 1
+ },
+ });
+ if (data.records.length > 0) {
+ const record = data.records[0].value as statusSphere;
+ return record.status;
+ }
+ return null;
+}
+
type CacheEntry
= {
data: T;
expire_timestamp: number;
@@ -448,5 +467,5 @@ const cacheGet = (key: string): T | null => {
}
}
-export { getAllMetadataFromPds, getNextPosts, Post, blueskyHandleFromDid, getTealNowListeningTo };
+export { getAllMetadataFromPds, getNextPosts, Post, blueskyHandleFromDid, getTealNowListeningTo, getStatusSphere };
export type { AccountMetadata };