+1
-1
api/tangled/actorprofile.go
+1
-1
api/tangled/actorprofile.go
···
19
19
type ActorProfile struct {
20
20
LexiconTypeID string `json:"$type,const=sh.tangled.actor.profile" cborgen:"$type,const=sh.tangled.actor.profile"`
21
21
// bluesky: Include link to this account on Bluesky.
22
-
Bluesky *bool `json:"bluesky,omitempty" cborgen:"bluesky,omitempty"`
22
+
Bluesky bool `json:"bluesky" cborgen:"bluesky"`
23
23
// description: Free-form profile description text.
24
24
Description *string `json:"description,omitempty" cborgen:"description,omitempty"`
25
25
Links []string `json:"links,omitempty" cborgen:"links,omitempty"`
+25
-53
api/tangled/cbor_gen.go
+25
-53
api/tangled/cbor_gen.go
···
3398
3398
cw := cbg.NewCborWriter(w)
3399
3399
fieldCount := 7
3400
3400
3401
-
if t.Bluesky == nil {
3402
-
fieldCount--
3403
-
}
3404
-
3405
3401
if t.Description == nil {
3406
3402
fieldCount--
3407
3403
}
···
3518
3514
}
3519
3515
3520
3516
// t.Bluesky (bool) (bool)
3521
-
if t.Bluesky != nil {
3517
+
if len("bluesky") > 1000000 {
3518
+
return xerrors.Errorf("Value in field \"bluesky\" was too long")
3519
+
}
3522
3520
3523
-
if len("bluesky") > 1000000 {
3524
-
return xerrors.Errorf("Value in field \"bluesky\" was too long")
3525
-
}
3521
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("bluesky"))); err != nil {
3522
+
return err
3523
+
}
3524
+
if _, err := cw.WriteString(string("bluesky")); err != nil {
3525
+
return err
3526
+
}
3526
3527
3527
-
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("bluesky"))); err != nil {
3528
-
return err
3529
-
}
3530
-
if _, err := cw.WriteString(string("bluesky")); err != nil {
3531
-
return err
3532
-
}
3533
-
3534
-
if t.Bluesky == nil {
3535
-
if _, err := cw.Write(cbg.CborNull); err != nil {
3536
-
return err
3537
-
}
3538
-
} else {
3539
-
if err := cbg.WriteBool(w, *t.Bluesky); err != nil {
3540
-
return err
3541
-
}
3542
-
}
3528
+
if err := cbg.WriteBool(w, t.Bluesky); err != nil {
3529
+
return err
3543
3530
}
3544
3531
3545
3532
// t.Location (string) (string)
···
3779
3766
// t.Bluesky (bool) (bool)
3780
3767
case "bluesky":
3781
3768
3782
-
{
3783
-
b, err := cr.ReadByte()
3784
-
if err != nil {
3785
-
return err
3786
-
}
3787
-
if b != cbg.CborNull[0] {
3788
-
if err := cr.UnreadByte(); err != nil {
3789
-
return err
3790
-
}
3791
-
3792
-
maj, extra, err = cr.ReadHeader()
3793
-
if err != nil {
3794
-
return err
3795
-
}
3796
-
if maj != cbg.MajOther {
3797
-
return fmt.Errorf("booleans must be major type 7")
3798
-
}
3799
-
3800
-
var val bool
3801
-
switch extra {
3802
-
case 20:
3803
-
val = false
3804
-
case 21:
3805
-
val = true
3806
-
default:
3807
-
return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra)
3808
-
}
3809
-
t.Bluesky = &val
3810
-
}
3769
+
maj, extra, err = cr.ReadHeader()
3770
+
if err != nil {
3771
+
return err
3772
+
}
3773
+
if maj != cbg.MajOther {
3774
+
return fmt.Errorf("booleans must be major type 7")
3775
+
}
3776
+
switch extra {
3777
+
case 20:
3778
+
t.Bluesky = false
3779
+
case 21:
3780
+
t.Bluesky = true
3781
+
default:
3782
+
return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra)
3811
3783
}
3812
3784
// t.Location (string) (string)
3813
3785
case "location":
+1
-4
appview/ingester.go
+1
-4
appview/ingester.go
+1
-1
appview/state/profile.go
+1
-1
appview/state/profile.go
+2
-2
lexicons/actor/profile.json
+2
-2
lexicons/actor/profile.json