GoAT Site is library that implements Standard.site in Go.
atprotocol standard-site atproto library
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(document): use strongref for bluesky ref

+9 -10
+1 -6
document.go
··· 47 47 TextContent string `json:"textContent,omitempty"` 48 48 // BlueskyPostRef is a strong reference to a Bluesky post. 49 49 // Useful to keep track of comments off-platform. 50 - // 51 - // Currently, the type is [any], because I don't understand how I should represent it. 52 - // It looks like to be a strong ref, but a record generated by `leaflet.pub`: 53 - // 1. doesn't include a `$type` 54 - // 2. has more info than required by the lexicon used 55 - BlueskyPostRef any `json:"bskyPostRef,omitempty"` 50 + BlueskyPostRef *xrpc.StrongRef `json:"bskyPostRef,omitempty"` 56 51 // Tags is an array of strings used to tag or categorize the [Document]. 57 52 // Avoid prepending tags with hashtags. 58 53 // Max length: 1280.
+8 -4
document_test.go
··· 150 150 *u.RecordKey(), 151 151 ) 152 152 if err != nil { 153 - t.Fatal(err) 154 - } 155 - if !valid { 153 + t.Errorf("cannot verify %s: %v", uri, err) 154 + } else if !valid { 156 155 t.Errorf("cannot verify %s", uri) 157 156 } 157 + if doc.BlueskyPostRef != nil { 158 + _, err := doc.BlueskyPostRef.GetRef(context.Background(), client) 159 + if err != nil { 160 + t.Errorf("cannot get bluesky post ref %s: %v", doc.BlueskyPostRef.URI, err) 161 + } 162 + } 158 163 } 159 - 160 164 } 161 165 162 166 func TestListDocuments(t *testing.T) {