Fix RoomAvatarEvent historic fallback

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
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>,
})
}