mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
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) {
|
||||
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 a new issue