Fix RoomAvatarEvent historic fallback

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2019-08-09 11:31:04 +01:00
parent 423a74c99c
commit ee3542453e
2 changed files with 3 additions and 2 deletions

View file

@ -133,7 +133,6 @@ module.exports = React.createClass({
},
onError: function(ev) {
console.log("onError");
const nextIndex = this.state.urlsIndex + 1;
if (nextIndex < this.state.imageUrls.length) {
// try the next one

View file

@ -64,8 +64,10 @@ module.exports = React.createClass({
}
const room = MatrixClientPeg.get().getRoom(ev.getRoomId());
// Provide all arguments to RoomAvatar via oobData because the avatar is historic
const oobData = {
avatarUrl: ev.getContent().url,
name: room ? room.name : "",
};
return (
@ -76,7 +78,7 @@ module.exports = React.createClass({
'img': () =>
<AccessibleButton key="avatar" className="mx_RoomAvatarEvent_avatar"
onClick={this.onAvatarClick}>
<RoomAvatar width={14} height={14} room={room} oobData={oobData} />
<RoomAvatar width={14} height={14} oobData={oobData} />
</AccessibleButton>,
})
}