diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-12-30 19:16:49 +0100 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-12-30 19:34:18 +0100 |
commit | d9b74131aedd0f263aa7fe35307ee2c6d6e6ab86 (patch) | |
tree | 4c005f8c67ab0c4c4878f9ca13488a461872326c /models/users.js | |
parent | f6c01161a02e273b87c9f6cc02d3809b997241ba (diff) | |
download | wekan-d9b74131aedd0f263aa7fe35307ee2c6d6e6ab86.tar.gz wekan-d9b74131aedd0f263aa7fe35307ee2c6d6e6ab86.tar.bz2 wekan-d9b74131aedd0f263aa7fe35307ee2c6d6e6ab86.zip |
Fix avatar support on Sanstorm
The bug comes for 9154b06 which this commit partially reverts. The
synchronization between the user document profile and the Sandstorm
HTTP headers is still not perfect. Having a clean model may requires
the `accounts-sandstorm` to expose a hook to modify the user document
just after the `services.sandstorm` credentials are updated.
Fixes #460
Diffstat (limited to 'models/users.js')
-rw-r--r-- | models/users.js | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/models/users.js b/models/users.js index bb7ecc45..45e2170e 100644 --- a/models/users.js +++ b/models/users.js @@ -47,19 +47,6 @@ Users.helpers({ return _.contains(invitedBoards, boardId); }, - getAvatarUrl() { - // Although we put the avatar picture URL in the `profile` object, we need - // to support Sandstorm which put in the `picture` attribute by default. - // XXX Should we move both cases to `picture`? - if (this.picture) { - return this.picture; - } else if (this.profile && this.profile.avatarUrl) { - return this.profile.avatarUrl; - } else { - return null; - } - }, - getInitials() { const profile = this.profile || {}; if (profile.initials) |