this repo has no description
0
fork

Configure Feed

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

Revert "make identity.Identity more easily JSON serializable" (#1037)

This caused problems in prod. Unbeknownst to me, we had been serializing
identity metadata as JSON using this struct and persisting it. Then
passing back to TypeScript (not golang!), which depended on the
capitalization (case-sensitive JSON parsing).

Reverting for now. Note that the go stdlib JSON code is actually
case-insensitive for keys, so the text fixtures in this repo which had
been updated to depend on this are not impacted (!).

Direct link to original PR:
https://github.com/bluesky-social/indigo/pull/1017

authored by

bnewbold and committed by
GitHub
e2741b8d 59baab82

+9 -9
+9 -9
atproto/identity/identity.go
··· 13 13 14 14 // Represents an atproto identity. Could be a regular user account, or a service account (eg, feed generator) 15 15 type Identity struct { 16 - DID syntax.DID `json:"did"` 16 + DID syntax.DID 17 17 18 18 // Handle/DID mapping must be bi-directionally verified. If that fails, the Handle should be the special 'handle.invalid' value 19 - Handle syntax.Handle `json:"handle"` 19 + Handle syntax.Handle 20 20 21 21 // These fields represent a parsed subset of a DID document. They are all nullable. Note that the services and keys maps do not preserve order, so they don't exactly round-trip DID documents. 22 - AlsoKnownAs []string `json:"alsoKnownAs"` 23 - Services map[string]Service `json:"services"` 24 - Keys map[string]Key `json:"keys"` 22 + AlsoKnownAs []string 23 + Services map[string]Service 24 + Keys map[string]Key 25 25 } 26 26 27 27 type Key struct { 28 - Type string `json:"type"` 29 - PublicKeyMultibase string `json:"publicKeyMultibase"` 28 + Type string 29 + PublicKeyMultibase string 30 30 } 31 31 32 32 type Service struct { 33 - Type string `json:"type"` 34 - URL string `json:"url"` 33 + Type string 34 + URL string 35 35 } 36 36 37 37 // Extracts the information relevant to atproto from an arbitrary DID document.