add comment for PreferredName
This commit is contained in:
parent
deb56c2c81
commit
327f171e13
|
@ -160,6 +160,15 @@ type Settings struct {
|
||||||
NotificationsEnabled bool `json:"notifications-enabled?,omitempty"`
|
NotificationsEnabled bool `json:"notifications-enabled?,omitempty"`
|
||||||
PhotoPath string `json:"photo-path"`
|
PhotoPath string `json:"photo-path"`
|
||||||
PinnedMailserver *json.RawMessage `json:"pinned-mailservers,omitempty"`
|
PinnedMailserver *json.RawMessage `json:"pinned-mailservers,omitempty"`
|
||||||
|
// PreferredName represents the user's preferred Ethereum Name Service (ENS) name.
|
||||||
|
// If a user has multiple ENS names, they can select one as the PreferredName.
|
||||||
|
// When PreferredName is set, it takes precedence over the DisplayName for displaying the user's name.
|
||||||
|
// If PreferredName is empty or doesn't match any of the user's ENS names, the DisplayName is used instead.
|
||||||
|
//
|
||||||
|
// There is a race condition between updating DisplayName and PreferredName, where the account.Name field
|
||||||
|
// could be incorrectly updated based on the order in which the backup messages (BackedUpProfile/BackedUpSettings) arrive.
|
||||||
|
// To handle this race condition, the code checks the LastSynced clock value for both DisplayName and PreferredName,
|
||||||
|
// and updates account.Name with the value that has the latest clock
|
||||||
PreferredName *string `json:"preferred-name,omitempty"`
|
PreferredName *string `json:"preferred-name,omitempty"`
|
||||||
PreviewPrivacy bool `json:"preview-privacy?"`
|
PreviewPrivacy bool `json:"preview-privacy?"`
|
||||||
PublicKey string `json:"public-key"`
|
PublicKey string `json:"public-key"`
|
||||||
|
|
Loading…
Reference in New Issue