Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 8dc2604

Browse files
committed
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 <[email protected]>
1 parent 94ec11d commit 8dc2604

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/components/views/messages/UnknownBody.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ module.exports = React.createClass({
2323
displayName: 'UnknownBody',
2424

2525
render: function() {
26+
let tooltip = _t("Removed or unknown message type");
27+
if (this.props.mxEvent.isRedacted()) {
28+
tooltip = _t("Message removed by %(userId)s", {userId: this.props.mxEvent.getSender()});
29+
}
30+
2631
const text = this.props.mxEvent.getContent().body;
2732
return (
28-
<span className="mx_UnknownBody" title={_t("Removed or unknown message type")}>
33+
<span className="mx_UnknownBody" title={tooltip}>
2934
{text}
3035
</span>
3136
);

src/i18n/strings/en_EN.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,7 @@
827827
"Autocomplete Delay (ms):": "Autocomplete Delay (ms):",
828828
"This Home server does not support groups": "This Home server does not support groups",
829829
"Loading device info...": "Loading device info...",
830+
"Message removed by %(userId)s": "Message removed by %(userId)s",
830831
"Groups": "Groups",
831832
"Create a new group": "Create a new group",
832833
"Create Group": "Create Group",

src/i18n/strings/en_US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,7 @@
838838
"Autocomplete Delay (ms):": "Autocomplete Delay (ms):",
839839
"This Home server does not support groups": "This Home server does not support groups",
840840
"Loading device info...": "Loading device info...",
841+
"Message removed by %(userId)s": "Message removed by %(userId)s",
841842
"Groups": "Groups",
842843
"Create a new group": "Create a new group",
843844
"Create Group": "Create Group",

0 commit comments

Comments
 (0)