Skip to content

Commit 3417d46

Browse files
authored
feat: expose person bio/banner (#27)
1 parent 059a471 commit 3417d46

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/providers/piefed/compat.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ export function toPerson(
115115
return {
116116
...person,
117117
avatar: person.avatar ?? undefined, // TODO piefed types are wrong, this is returned as null if not set
118+
banner: person.banner ?? undefined, // TODO piefed types are wrong, this is returned as null if not set
119+
bio: person.about ?? undefined, // TODO piefed types are wrong, this is returned as null if not set
118120
bot_account: person.bot,
119121
display_name: person.title ?? undefined, // TODO piefed types are wrong, this is returned as null if not set
120122
name: person.user_name!,

src/schemas/Person.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { z } from "zod/v4-mini";
33
export const Person = z.object({
44
actor_id: z.string(),
55
avatar: z.optional(z.string()),
6+
banner: z.optional(z.string()),
7+
bio: z.optional(z.string()),
68
bot_account: z.boolean(),
79
deleted: z.boolean(),
810
display_name: z.optional(z.string()),

0 commit comments

Comments
 (0)