mirror of https://github.com/vector-im/riot-web
done -> then, style
parent
61c16569cb
commit
5efd5bf927
|
@ -112,7 +112,7 @@ const Pill = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
doProfileLookup: function(userId, member) {
|
doProfileLookup: function(userId, member) {
|
||||||
MatrixClientPeg.get().getProfileInfo(userId).done((resp) => {
|
MatrixClientPeg.get().getProfileInfo(userId).then((resp) => {
|
||||||
member.name = resp.displayname;
|
member.name = resp.displayname;
|
||||||
member.rawDisplayName = resp.displayname;
|
member.rawDisplayName = resp.displayname;
|
||||||
member.events.member = {
|
member.events.member = {
|
||||||
|
@ -120,13 +120,9 @@ const Pill = React.createClass({
|
||||||
return {avatar_url: resp.avatar_url};
|
return {avatar_url: resp.avatar_url};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setState({member});
|
this.setState({member});
|
||||||
}, (err) => {
|
}).catch((err) => {
|
||||||
console.error(
|
console.error('Could not retrieve profile data for ' + userId + ':', err);
|
||||||
'Could not retrieve profile data for ' + userId + ':',
|
|
||||||
err,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue