a tool for shared writing and social publishing

add handle to bsky_profiles table

+12
+7
appview/index.ts
··· 50 50 ids.AppBskyActorProfile, 51 51 ], 52 52 handleEvent: async (evt) => { 53 + if (evt.event === "identity") { 54 + if (evt.handle) 55 + await supabase 56 + .from("bsky_profiles") 57 + .update({ handle: evt.handle }) 58 + .eq("did", evt.did); 59 + } 53 60 if ( 54 61 evt.event == "account" || 55 62 evt.event === "identity" ||
+1
drizzle/schema.ts
··· 28 28 did: text("did").primaryKey().notNull().references(() => identities.atp_did, { onDelete: "cascade" } ), 29 29 record: jsonb("record").notNull(), 30 30 indexed_at: timestamp("indexed_at", { withTimezone: true, mode: 'string' }).defaultNow().notNull(), 31 + handle: text("handle"), 31 32 }); 32 33 33 34 export const publications = pgTable("publications", {
+3
supabase/database.types.ts
··· 37 37 bsky_profiles: { 38 38 Row: { 39 39 did: string 40 + handle: string | null 40 41 indexed_at: string 41 42 record: Json 42 43 } 43 44 Insert: { 44 45 did: string 46 + handle?: string | null 45 47 indexed_at?: string 46 48 record: Json 47 49 } 48 50 Update: { 49 51 did?: string 52 + handle?: string | null 50 53 indexed_at?: string 51 54 record?: Json 52 55 }
+1
supabase/migrations/20250615154505_add_handle_to_bsky_profiles.sql
··· 1 + alter table "public"."bsky_profiles" add column "handle" text;