Merge pull request #1538 from matrix-org/luke/fix-redaction-sender-tooltip
Use the correct userId when displaying who redacted a message
This commit is contained in:
commit
4cfbd66729
2 changed files with 9 additions and 5 deletions
|
@ -25,7 +25,10 @@ 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()});
|
||||
const redactedBecauseUserId = this.props.mxEvent.getUnsigned().redacted_because.sender;
|
||||
tooltip = redactedBecauseUserId ?
|
||||
_t("Message removed by %(userId)s", { userId: redactedBecauseUserId }) :
|
||||
_t("Message removed");
|
||||
}
|
||||
|
||||
const text = this.props.mxEvent.getContent().body;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue