radiks
radiks copied to clipboard
Request: User model nested profile data grows stale
When the user initially signs into an application and gets registered via User model via
await User.createWithCurrentUser()
, a document is created with some nested data via profile.
At that moment in time the profile information matches what you would normally see from a normal lookup
.
However, as the user adds more apps and possibly runs into the bug of using older blockstack browsers, the apps array between a user model and his/her profile.json can be out of sync.
Example:
profile.json via lookupProfile
profile via User model
Not sure what the best workaround for this because it will be hard to tell when a user's profile apps was updated. Either way, do you think adding an additional function on the User model to update his/her profile should/could be provided? Thanks!
Yes, definitely we could add a method to User
, maybe something like updateProfile()
or something.