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>
pull/21833/head
turt2live 2017-09-14 09:02:16 -06:00
parent 94ec11d3e1
commit 8dc2604d63
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>
);

View File

@ -827,6 +827,7 @@
"Autocomplete Delay (ms):": "Autocomplete Delay (ms):",
"This Home server does not support groups": "This Home server does not support groups",
"Loading device info...": "Loading device info...",
"Message removed by %(userId)s": "Message removed by %(userId)s",
"Groups": "Groups",
"Create a new group": "Create a new group",
"Create Group": "Create Group",

View File

@ -838,6 +838,7 @@
"Autocomplete Delay (ms):": "Autocomplete Delay (ms):",
"This Home server does not support groups": "This Home server does not support groups",
"Loading device info...": "Loading device info...",
"Message removed by %(userId)s": "Message removed by %(userId)s",
"Groups": "Groups",
"Create a new group": "Create a new group",
"Create Group": "Create Group",