this repo has no description
0
fork

Configure Feed

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

Some lexicon work to get new label schemas to codegen properly

+72 -2
+2
api/atproto/admindefs.go
··· 124 124 LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventEmail" cborgen:"$type,const=com.atproto.admin.defs#modEventEmail"` 125 125 // comment: Additional comment about the outgoing comm. 126 126 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 127 + // content: The content of the email sent to the user. 128 + Content *string `json:"content,omitempty" cborgen:"content,omitempty"` 127 129 // subjectLine: The subject line of the email sent to the user. 128 130 SubjectLine string `json:"subjectLine" cborgen:"subjectLine"` 129 131 }
+56 -1
api/atproto/cbor_gen.go
··· 2171 2171 } 2172 2172 2173 2173 cw := cbg.NewCborWriter(w) 2174 - fieldCount := 6 2174 + fieldCount := 7 2175 2175 2176 2176 if t.Cid == nil { 2177 2177 fieldCount-- 2178 2178 } 2179 2179 2180 2180 if t.Neg == nil { 2181 + fieldCount-- 2182 + } 2183 + 2184 + if t.Sig == nil { 2181 2185 fieldCount-- 2182 2186 } 2183 2187 ··· 2263 2267 return err 2264 2268 } 2265 2269 } 2270 + } 2271 + 2272 + // t.Sig (util.LexBytes) (slice) 2273 + if t.Sig != nil { 2274 + 2275 + if uint64(len("sig")) > cbg.MaxLength { 2276 + return xerrors.Errorf("Value in field \"sig\" was too long") 2277 + } 2278 + 2279 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("sig"))); err != nil { 2280 + return err 2281 + } 2282 + if _, err := cw.WriteString(string("sig")); err != nil { 2283 + return err 2284 + } 2285 + 2286 + if uint64(len(t.Sig)) > cbg.ByteArrayMaxLen { 2287 + return xerrors.Errorf("Byte array in field t.Sig was too long") 2288 + } 2289 + 2290 + if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.Sig))); err != nil { 2291 + return err 2292 + } 2293 + 2294 + if _, err := cw.Write(t.Sig); err != nil { 2295 + return err 2296 + } 2297 + 2266 2298 } 2267 2299 2268 2300 // t.Src (string) (string) ··· 2439 2471 t.Neg = &val 2440 2472 } 2441 2473 } 2474 + // t.Sig (util.LexBytes) (slice) 2475 + case "sig": 2476 + 2477 + maj, extra, err = cr.ReadHeader() 2478 + if err != nil { 2479 + return err 2480 + } 2481 + 2482 + if extra > cbg.ByteArrayMaxLen { 2483 + return fmt.Errorf("t.Sig: byte array too large (%d)", extra) 2484 + } 2485 + if maj != cbg.MajByteString { 2486 + return fmt.Errorf("expected byte array") 2487 + } 2488 + 2489 + if extra > 0 { 2490 + t.Sig = make([]uint8, extra) 2491 + } 2492 + 2493 + if _, err := io.ReadFull(cr, t.Sig); err != nil { 2494 + return err 2495 + } 2496 + 2442 2497 // t.Src (string) (string) 2443 2498 case "src": 2444 2499
+8
api/atproto/labeldefs.go
··· 4 4 5 5 // schema: com.atproto.label.defs 6 6 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 7 11 // LabelDefs_Label is a "label" in the com.atproto.label.defs schema. 8 12 // 9 13 // Metadata tag on an atproto resource (eg, repo or record). ··· 14 18 Cts string `json:"cts" cborgen:"cts"` 15 19 // neg: If true, this is a negation label, overwriting a previous label. 16 20 Neg *bool `json:"neg,omitempty" cborgen:"neg,omitempty"` 21 + // sig: Signature of dag-cbor encoded label. 22 + Sig util.LexBytes `json:"sig,omitempty" cborgen:"sig,omitempty"` 17 23 // src: DID of the actor who created this label. 18 24 Src string `json:"src" cborgen:"src"` 19 25 // uri: AT URI of the record, repository (account), or other resource that this label applies to. 20 26 Uri string `json:"uri" cborgen:"uri"` 21 27 // val: The short string name of the value or type of this label. 22 28 Val string `json:"val" cborgen:"val"` 29 + // ver: The AT Protocol version of the label object. 30 + Ver *int64 `json:"ver,omitempty" cborgen:"ver,omitempty"` 23 31 } 24 32 25 33 // LabelDefs_LabelValueDefinition is a "labelValueDefinition" in the com.atproto.label.defs schema.
+1 -1
api/bsky/cbor_gen.go
··· 6168 6168 return err 6169 6169 } 6170 6170 6171 - t.LabelValues[i] = &sval 6171 + t.LabelValues[i] = string(sval) 6172 6172 } 6173 6173 6174 6174 }
+5
lex/gen.go
··· 1242 1242 1243 1243 jsonOmit, cborOmit := omit, omit 1244 1244 1245 + // Don't generate pointers to lexbytes, as it's already a pointer. 1246 + if ptr == "*" && tname == "util.LexBytes" { 1247 + ptr = "" 1248 + } 1249 + 1245 1250 // TODO: hard-coded hacks for now, making this type (with underlying type []byte) 1246 1251 // be omitempty. 1247 1252 if ptr == "" && tname == "util.LexBytes" {