mirror of https://github.com/vector-im/riot-web
No need for "redactor" as we dont currently show it
parent
9bae936816
commit
abd71cd2ac
|
@ -17,7 +17,6 @@ limitations under the License.
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var React = require('react');
|
var React = require('react');
|
||||||
var MatrixClientPeg = require('../../../MatrixClientPeg');
|
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
displayName: 'UnknownBody',
|
displayName: 'UnknownBody',
|
||||||
|
@ -26,10 +25,7 @@ module.exports = React.createClass({
|
||||||
const ev = this.props.mxEvent;
|
const ev = this.props.mxEvent;
|
||||||
var text = ev.getContent().body;
|
var text = ev.getContent().body;
|
||||||
if (ev.isRedacted()) {
|
if (ev.isRedacted()) {
|
||||||
const room = MatrixClientPeg.get().getRoom(ev.getRoomId());
|
text = "This event was redacted";
|
||||||
const because = ev.getUnsigned().redacted_because;
|
|
||||||
const name = room.getMember(because.sender).name || because.sender;
|
|
||||||
text = "This event was redacted by " + name;
|
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<span className="mx_UnknownBody">
|
<span className="mx_UnknownBody">
|
||||||
|
|
Loading…
Reference in New Issue