diff --git a/components/chat.js b/components/chat.js index 4519e63..f488f60 100644 --- a/components/chat.js +++ b/components/chat.js @@ -100,7 +100,7 @@ let chat = create({ messageGroups.groups.push(messageGroups.current) events = messageGroups.groups.map((events, id) => { - return + return }) } //TODO: replace with something that only renders events in view @@ -116,15 +116,16 @@ let EventGroup = create({ displayName: "EventGroup", getInitialState: function() { + let user = this.props.client.getUser(this.props.events[0].sender) let color = ["red", "green", "yellow", "blue", "purple", "cyan"][Math.floor(Math.random()*6)] return { color: color, - sender: this.props.events[0].sender + user: user } }, avatarRef: function(ref) { - jdenticon.update(ref, this.state.sender) + jdenticon.update(ref, this.state.user.userId) }, render: function() { @@ -134,7 +135,7 @@ let EventGroup = create({ return
-
{this.state.sender}
+
{this.state.user.displayName}
{events}
diff --git a/components/sidebar.js b/components/sidebar.js index e113ea6..7d44d69 100644 --- a/components/sidebar.js +++ b/components/sidebar.js @@ -42,7 +42,7 @@ let RoomListItem = create({ className += " unread" } return
- + {this.props.content.name}
}