Merge pull request #1742 from aidalgol/show-display-name-in-receipts
Add display name to the read receipt viewpull/21833/head
commit
a26f3f453c
|
@ -185,10 +185,21 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
let title;
|
let title;
|
||||||
if (this.props.timestamp) {
|
if (this.props.timestamp) {
|
||||||
|
const dateString = formatDate(new Date(this.props.timestamp), this.props.showTwelveHour);
|
||||||
|
if (this.props.member.userId === this.props.member.rawDisplayName) {
|
||||||
title = _t(
|
title = _t(
|
||||||
"Seen by %(userName)s at %(dateTime)s",
|
"Seen by %(userName)s at %(dateTime)s",
|
||||||
{userName: this.props.member.userId, dateTime: formatDate(new Date(this.props.timestamp), this.props.showTwelveHour)},
|
{userName: this.props.member.userId,
|
||||||
|
dateTime: dateString},
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
title = _t(
|
||||||
|
"Seen by %(displayName)s (%(userName)s) at %(dateTime)s",
|
||||||
|
{displayName: this.props.member.rawDisplayName,
|
||||||
|
userName: this.props.member.userId,
|
||||||
|
dateTime: dateString},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -390,6 +390,7 @@
|
||||||
"Unknown": "Unknown",
|
"Unknown": "Unknown",
|
||||||
"Replying": "Replying",
|
"Replying": "Replying",
|
||||||
"Seen by %(userName)s at %(dateTime)s": "Seen by %(userName)s at %(dateTime)s",
|
"Seen by %(userName)s at %(dateTime)s": "Seen by %(userName)s at %(dateTime)s",
|
||||||
|
"Seen by %(displayName)s (%(userName)s) at %(dateTime)s": "Seen by %(displayName)s (%(userName)s) at %(dateTime)s",
|
||||||
"No rooms to show": "No rooms to show",
|
"No rooms to show": "No rooms to show",
|
||||||
"Unnamed room": "Unnamed room",
|
"Unnamed room": "Unnamed room",
|
||||||
"World readable": "World readable",
|
"World readable": "World readable",
|
||||||
|
|
Loading…
Reference in New Issue