From fd6e7663cb60281138aa0b6e53a9e01ebeeb674b Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 28 Sep 2015 17:52:34 +0100 Subject: [PATCH] Fix notifications --- src/Avatar.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Avatar.js b/src/Avatar.js index a5b59a726d..2f83ebd938 100644 --- a/src/Avatar.js +++ b/src/Avatar.js @@ -19,6 +19,19 @@ limitations under the License. var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); module.exports = { + avatarUrlForMember: function(member, width, height, resizeMethod) { + var url = MatrixClientPeg.get().getAvatarUrlForMember( + member, + width, + height, + resizeMethod + ); + if (!url) { + url = this.defaultAvatarUrlForString(member.userId); + } + return url; + }, + defaultAvatarUrlForString: function(s) { var total = 0; for (var i = 0; i < s.length; ++i) {