bluesky appview implementation using microcosm and other services server.reddwarf.app
appview bluesky reddwarf microcosm

profileviewbasic NPE

Changed files
+12 -1
shims
lex
app
bsky
actor
+5 -1
main.go
··· 205 205 // really bad actually 206 206 router.GET("/xrpc/app.bsky.notification.listNotifications", 207 207 func(c *gin.Context) { 208 - c.JSON(http.StatusOK, nil) 208 + emptyarray := []*appbsky.NotificationListNotifications_Notification{} 209 + notifshim := &appbsky.NotificationListNotifications_Output{ 210 + Notifications: emptyarray, 211 + } 212 + c.JSON(http.StatusOK, notifshim) 209 213 }) 210 214 211 215 router.GET("/xrpc/app.bsky.labeler.getServices",
+7
shims/lex/app/bsky/actor/defs/profileview.go
··· 15 15 func ProfileViewBasic(ctx context.Context, did utils.DID, sl *microcosm.MicrocosmClient, imgcdn string) (*appbsky.ActorDefs_ProfileViewBasic, *appbsky.ActorProfile, error) { 16 16 profileview, profile, err := ProfileView(ctx, did, sl, imgcdn) 17 17 18 + if err != nil { 19 + return nil, nil, err 20 + } 21 + if profileview == nil { 22 + return nil, nil, nil 23 + } 24 + 18 25 return &appbsky.ActorDefs_ProfileViewBasic{ 19 26 Associated: profileview.Associated, 20 27 Avatar: profileview.Avatar,