diff --git a/components/chat.js b/components/chat.js
index f728304..b92863d 100644
--- a/components/chat.js
+++ b/components/chat.js
@@ -116,10 +116,21 @@ let EventGroup = create({
getInitialState: function() {
let user = this.props.client.getUser(this.props.events[0].sender)
+ let avatar =
+
+ if (user.avatarUrl != null) {
+ let hs = this.props.client.baseUrl
+ let media_mxc = user.avatarUrl.slice(6)
+ let url = `${hs}/_matrix/media/v1/thumbnail/${media_mxc}?width=128&height=128&method=scale`
+ avatar =
+ }
+
+ console.log(user)
let color = ["red", "green", "yellow", "blue", "purple", "cyan"][Math.floor(Math.random()*6)]
return {
color: color,
- user: user
+ user: user,
+ avatar: avatar
}
},
@@ -132,7 +143,7 @@ let EventGroup = create({
return