Fix notifications
This commit is contained in:
parent
7d540572fd
commit
fd6e7663cb
1 changed files with 13 additions and 0 deletions
|
@ -19,6 +19,19 @@ limitations under the License.
|
||||||
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
||||||
|
|
||||||
module.exports = {
|
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) {
|
defaultAvatarUrlForString: function(s) {
|
||||||
var total = 0;
|
var total = 0;
|
||||||
for (var i = 0; i < s.length; ++i) {
|
for (var i = 0; i < s.length; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue