hoodiehq / hoodie-account-client

:dog: Account client API for the browser
https://hoodiehq.github.io/hoodie-account-client
Apache License 2.0
11 stars 24 forks source link

feat: emit update event on profile change #111

Closed espy closed 8 years ago

varjmes commented 8 years ago

LGTM ✨

deskbeers

gr2m commented 8 years ago

looking at it now

gr2m commented 8 years ago

The account update event currently does not pass the profile property

account.on('update', function (account) {
  // account.profile is undefined
})
account.profile.update({foo: 'bar'})

It’s somewhat related to https://github.com/hoodiehq/hoodie-account-client/issues/107. Probably the simplest solution for both #107 and this PR is to always include profile everywhere. It might eventually become a performance issues with people start storing gazillions of data in account profiles, but until then we should be fine?

Any thoughts?

gr2m commented 8 years ago

never mind, this is not affected, profile is included in the update event, LGTM! Merging