this repo has no description
0
fork

Configure Feed

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

updates from schema tweaks

+9 -20
+5 -14
atproto/identity/apidir/apidir.go
··· 27 27 var _ identity.Resolver = (*APIDirectory)(nil) 28 28 29 29 type identityBody struct { 30 - DID syntax.DID `json:"did"` 31 - Handle *syntax.Handle `json:"handle,omitempty"` 32 - DIDDoc *json.RawMessage `json:"didDoc,omitempty"` 33 - Tombstoned bool `json:"tombstoned"` 30 + DID syntax.DID `json:"did"` 31 + Handle syntax.Handle `json:"handle"` 32 + DIDDoc json.RawMessage `json:"didDoc"` 34 33 } 35 34 36 35 type didBody struct { ··· 172 171 return nil, err 173 172 } 174 173 175 - if body.Tombstoned || body.DIDDoc == nil { 176 - return nil, identity.ErrDIDNotFound 177 - } 178 - 179 174 var doc identity.DIDDocument 180 - if err := json.Unmarshal(*body.DIDDoc, &doc); err != nil { 175 + if err := json.Unmarshal(body.DIDDoc, &doc); err != nil { 181 176 return nil, fmt.Errorf("%w: JSON DID document parse: %w", identity.ErrDIDResolutionFailed, err) 182 177 } 183 178 184 179 ident := identity.ParseIdentity(&doc) 185 - if body.Handle != nil { 186 - ident.Handle = *body.Handle 187 - } else { 188 - ident.Handle = syntax.Handle("invalid.handle") 189 - } 180 + ident.Handle = body.Handle 190 181 191 182 return &ident, nil 192 183 }
+4 -6
cmd/domesday/handlers.go
··· 118 118 }) 119 119 } 120 120 121 - h := handle.String() 122 - return c.JSON(200, comatproto.IdentityDefs_AtprotoIdentity{ 121 + return c.JSON(200, comatproto.IdentityDefs_IdentityInfo{ 123 122 Did: ident.DID.String(), 124 - Handle: &h, 123 + Handle: handle.String(), 125 124 DidDoc: rawDoc, 126 125 }) 127 126 } ··· 163 162 handle = syntax.Handle("handle.invalid") 164 163 } 165 164 166 - h := handle.String() 167 - return c.JSON(200, comatproto.IdentityDefs_AtprotoIdentity{ 165 + return c.JSON(200, comatproto.IdentityDefs_IdentityInfo{ 168 166 Did: ident.DID.String(), 169 - Handle: &h, 167 + Handle: handle.String(), 170 168 DidDoc: rawDoc, 171 169 }) 172 170 }