Use the correct userId when displaying who redacted a message

pull/21833/head
Luke Barnard 2017-10-25 17:24:45 +01:00
parent 19364c25ee
commit 5990e41bd7
1 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,9 @@ module.exports = React.createClass({
render: function() {
let tooltip = _t("Removed or unknown message type");
if (this.props.mxEvent.isRedacted()) {
tooltip = _t("Message removed by %(userId)s", {userId: this.props.mxEvent.getSender()});
tooltip = _t("Message removed by %(userId)s", {
userId: this.props.mxEvent.getUnsigned().redacted_because.sender,
});
}
const text = this.props.mxEvent.getContent().body;