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

PostView filter nil profiles

Changed files
+19 -14
shims
lex
app
bsky
feed
+9 -8
readme.md
··· 7 7 still very early in development 8 8 9 9 implemented routes: 10 - - app.bsky.actor.getProfiles 11 - - app.bsky.actor.getProfile 12 - - app.bsky.notification.listNotifications (placeholder) 13 - - app.bsky.labeler.getServices 14 - - app.bsky.feed.getFeedGenerators 15 - - app.bsky.feed.getPosts (post rendering is incomplete) 16 - - app.bsky.feed.getFeed (post rendering is incomplete) 17 - - app.bsky.unspecced.getConfig (placeholder) 10 + - `app.bsky.actor.getProfiles` 11 + - `app.bsky.actor.getProfile` 12 + - `app.bsky.notification.listNotifications` (placeholder) 13 + - `app.bsky.labeler.getServices` 14 + - `app.bsky.feed.getFeedGenerators` 15 + - `app.bsky.feed.getPosts` (post rendering is incomplete) 16 + - `app.bsky.feed.getFeed` (post rendering is incomplete) 17 + - `app.bsky.unspecced.getConfig` (placeholder) 18 + - `app.bsky.unspecced.getPostThreadV2` (thread rendering is incomplete)
+1 -2
shims/lex/app/bsky/feed/defs/embed.go
··· 2 2 3 3 import ( 4 4 "context" 5 - "fmt" 6 5 "log" 7 6 8 7 "github.com/bluesky-social/indigo/api/atproto" ··· 26 25 } 27 26 28 27 func PostView_Embed(ctx context.Context, postaturi string, feedPost *appbsky.FeedPost, sl *microcosm.MicrocosmClient, cs *microcosm.MicrocosmClient, imgcdn string, viewer *utils.DID, disableTripleNestedRecord int) (*appbsky.FeedDefs_PostView_Embed, error) { 29 - log.Println("(PostView_Embed) hey its: " + postaturi + " at depth: " + fmt.Sprint(disableTripleNestedRecord)) 28 + //log.Println("(PostView_Embed) hey its: " + postaturi + " at depth: " + fmt.Sprint(disableTripleNestedRecord)) 30 29 if feedPost.Embed == nil { 31 30 return nil, nil 32 31 }
+9 -4
shims/lex/app/bsky/feed/defs/postview.go
··· 3 3 import ( 4 4 "context" 5 5 "encoding/json" 6 - "fmt" 7 - "log" 8 6 9 7 "github.com/bluesky-social/indigo/api/agnostic" 10 8 comatproto "github.com/bluesky-social/indigo/api/atproto" ··· 21 19 ) 22 20 23 21 func PostView(ctx context.Context, postaturi string, sl *microcosm.MicrocosmClient, cs *microcosm.MicrocosmClient, imgcdn string, viewer *utils.DID, disableTripleNestedRecord int) (*appbsky.FeedDefs_PostView, *appbsky.FeedPost, error) { 24 - log.Println("(PostView) hey its: " + postaturi + " at depth: " + fmt.Sprint(disableTripleNestedRecord)) 22 + //log.Println("(PostView) hey its: " + postaturi + " at depth: " + fmt.Sprint(disableTripleNestedRecord)) 25 23 aturi, err := syntax.ParseATURI(postaturi) 26 24 if err != nil { 27 25 return nil, nil, err ··· 51 49 } 52 50 //} 53 51 54 - profile, _, _ := appbskyactordefs.ProfileViewBasic(ctx, repoDID, sl, imgcdn) 52 + profile, _, err := appbskyactordefs.ProfileViewBasic(ctx, repoDID, sl, imgcdn) 53 + if err != nil || profile == nil { 54 + if profile == nil { 55 + //log.Println("WHAT!! profile / author field is null?!?!?! whyyy") 56 + //log.Println(err) 57 + } 58 + return nil, nil, err 59 + } 55 60 56 61 lexicontypedecoder := &util.LexiconTypeDecoder{Val: &postRecord} 57 62