Handle redaction with no sender
This commit is contained in:
parent
5990e41bd7
commit
cedc0b27a9
2 changed files with 9 additions and 7 deletions
|
@ -25,9 +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.getUnsigned().redacted_because.sender,
|
||||
});
|
||||
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