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

Commit 141ae91

Browse files
authored
Merge pull request #1387 from turt2live/travis/tooltip_redacter
Show who redacted an event on hover
2 parents b06d540 + 8dc2604 commit 141ae91

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
@@ -837,6 +837,7 @@
837837
"Autocomplete Delay (ms):": "Autocomplete Delay (ms):",
838838
"This Home server does not support groups": "This Home server does not support groups",
839839
"Loading device info...": "Loading device info...",
840+
"Message removed by %(userId)s": "Message removed by %(userId)s",
840841
"Groups": "Groups",
841842
"Create a new group": "Create a new group",
842843
"Create Group": "Create Group",

src/i18n/strings/en_US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,7 @@
848848
"Autocomplete Delay (ms):": "Autocomplete Delay (ms):",
849849
"This Home server does not support groups": "This Home server does not support groups",
850850
"Loading device info...": "Loading device info...",
851+
"Message removed by %(userId)s": "Message removed by %(userId)s",
851852
"Groups": "Groups",
852853
"Create a new group": "Create a new group",
853854
"Create Group": "Create Group",

0 commit comments

Comments
 (0)