Show who redacted an event on hover
This should fix #3931 although it's not obvious who actually performed the redaction. Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
94ec11d3e1
commit
8dc2604d63
3 changed files with 8 additions and 1 deletions
|
@ -23,9 +23,14 @@ module.exports = React.createClass({
|
|||
displayName: 'UnknownBody',
|
||||
|
||||
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 text = this.props.mxEvent.getContent().body;
|
||||
return (
|
||||
<span className="mx_UnknownBody" title={_t("Removed or unknown message type")}>
|
||||
<span className="mx_UnknownBody" title={tooltip}>
|
||||
{text}
|
||||
</span>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue