Fix RoomAvatarEvent historic fallback
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
423a74c99c
commit
ee3542453e
|
@ -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
|
||||
|
|
|
@ -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>,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue