mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 17:25:50 +03:00
Use JS-SDK recommended way of getting sender name.
This commit is contained in:
parent
672258f604
commit
f25bf58d6d
2 changed files with 4 additions and 3 deletions
|
@ -20,7 +20,7 @@ module.exports = React.createClass({
|
||||||
return (
|
return (
|
||||||
<div className="mx_MessageTile">
|
<div className="mx_MessageTile">
|
||||||
<MessageTimestamp ts={this.props.mxEvent.getTs()} />
|
<MessageTimestamp ts={this.props.mxEvent.getTs()} />
|
||||||
<SenderProfile memberName={this.props.mxEvent.getSender()} />:
|
<SenderProfile mxEvent={this.props.mxEvent} />:
|
||||||
<TileType mxEvent={this.props.mxEvent} />
|
<TileType mxEvent={this.props.mxEvent} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,10 +2,11 @@ var React = require('react');
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
render: function() {
|
render: function() {
|
||||||
var member = this.props.memberName;
|
var mxEvent = this.props.mxEvent;
|
||||||
|
var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
|
||||||
return (
|
return (
|
||||||
<span className="mx_SenderProfile">
|
<span className="mx_SenderProfile">
|
||||||
{member}
|
{name}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue