From f25bf58d6d3ea13851c1af710f8bee32e2191aaa Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 16 Jun 2015 14:19:46 +0100 Subject: [PATCH] Use JS-SDK recommended way of getting sender name. --- src/molecules/MessageTile.js | 2 +- src/molecules/SenderProfile.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/molecules/MessageTile.js b/src/molecules/MessageTile.js index 9956ace8..d789c2e9 100644 --- a/src/molecules/MessageTile.js +++ b/src/molecules/MessageTile.js @@ -20,7 +20,7 @@ module.exports = React.createClass({ return (
- : + :
); diff --git a/src/molecules/SenderProfile.js b/src/molecules/SenderProfile.js index 4481e465..517233c1 100644 --- a/src/molecules/SenderProfile.js +++ b/src/molecules/SenderProfile.js @@ -2,10 +2,11 @@ var React = require('react'); module.exports = React.createClass({ render: function() { - var member = this.props.memberName; + var mxEvent = this.props.mxEvent; + var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender(); return ( - {member} + {name} ); },