1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-17 17:42:41 +03:00

Merge pull request #1387 from turt2live/travis/tooltip_redacter

Show who redacted an event on hover
This commit is contained in:
Matthew Hodgson
2017-09-17 22:36:18 +01:00
committed by GitHub
3 changed files with 8 additions and 1 deletions

View File

@@ -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>
);