Fix RoomAvatarEvent historic fallback
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
423a74c99c
commit
ee3542453e
2 changed files with 3 additions and 2 deletions
|
@ -133,7 +133,6 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onError: function(ev) {
|
onError: function(ev) {
|
||||||
console.log("onError");
|
|
||||||
const nextIndex = this.state.urlsIndex + 1;
|
const nextIndex = this.state.urlsIndex + 1;
|
||||||
if (nextIndex < this.state.imageUrls.length) {
|
if (nextIndex < this.state.imageUrls.length) {
|
||||||
// try the next one
|
// try the next one
|
||||||
|
|
|
@ -64,8 +64,10 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
const room = MatrixClientPeg.get().getRoom(ev.getRoomId());
|
const room = MatrixClientPeg.get().getRoom(ev.getRoomId());
|
||||||
|
// Provide all arguments to RoomAvatar via oobData because the avatar is historic
|
||||||
const oobData = {
|
const oobData = {
|
||||||
avatarUrl: ev.getContent().url,
|
avatarUrl: ev.getContent().url,
|
||||||
|
name: room ? room.name : "",
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -76,7 +78,7 @@ module.exports = React.createClass({
|
||||||
'img': () =>
|
'img': () =>
|
||||||
<AccessibleButton key="avatar" className="mx_RoomAvatarEvent_avatar"
|
<AccessibleButton key="avatar" className="mx_RoomAvatarEvent_avatar"
|
||||||
onClick={this.onAvatarClick}>
|
onClick={this.onAvatarClick}>
|
||||||
<RoomAvatar width={14} height={14} room={room} oobData={oobData} />
|
<RoomAvatar width={14} height={14} oobData={oobData} />
|
||||||
</AccessibleButton>,
|
</AccessibleButton>,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue