Browse Source

Use JS-SDK recommended way of getting sender name.

pull/1/head
David Baker 7 years ago
parent
commit
f25bf58d6d
  1. 2
      src/molecules/MessageTile.js
  2. 5
      src/molecules/SenderProfile.js

2
src/molecules/MessageTile.js

@ -20,7 +20,7 @@ module.exports = React.createClass({
return (
<div className="mx_MessageTile">
<MessageTimestamp ts={this.props.mxEvent.getTs()} />
<SenderProfile memberName={this.props.mxEvent.getSender()} />:
<SenderProfile mxEvent={this.props.mxEvent} />:
<TileType mxEvent={this.props.mxEvent} />
</div>
);

5
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 (
<span className="mx_SenderProfile">
{member}
{name}
</span>
);
},

Loading…
Cancel
Save