diff --git a/src/components/views/messages/RedactedBody.tsx b/src/components/views/messages/RedactedBody.tsx index 5dada64b52..5f80460d03 100644 --- a/src/components/views/messages/RedactedBody.tsx +++ b/src/components/views/messages/RedactedBody.tsx @@ -19,6 +19,8 @@ import {MatrixClient} from "matrix-js-sdk/src/client"; import {MatrixEvent} from "matrix-js-sdk/src/models/event"; import { _t } from "../../../languageHandler"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; +import {formatFullDate} from "../../../DateUtils"; +import SettingsStore from "../../../settings/SettingsStore"; interface IProps { mxEvent: MatrixEvent; @@ -36,8 +38,12 @@ const RedactedBody = React.forwardRef(({mxEvent}, ref) => { text = _t("Message deleted by %(name)s", { name: sender ? sender.name : redactedBecauseUserId }); } + const showTwelveHour = SettingsStore.getValue("showTwelveHourTimestamps"); + const fullDate = formatFullDate(new Date(unsigned.redacted_because.origin_server_ts), showTwelveHour); + const titleText = _t("Message deleted on %(date)s", { date: fullDate }); + return ( - + { text } ); diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index f79d93b98f..a20acd9015 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1352,6 +1352,7 @@ "reacted with %(shortName)s": "reacted with %(shortName)s", "Message deleted": "Message deleted", "Message deleted by %(name)s": "Message deleted by %(name)s", + "Message deleted on %(date)s": "Message deleted on %(date)s", "%(senderDisplayName)s changed the avatar for %(roomName)s": "%(senderDisplayName)s changed the avatar for %(roomName)s", "%(senderDisplayName)s removed the room avatar.": "%(senderDisplayName)s removed the room avatar.", "%(senderDisplayName)s changed the room avatar to ": "%(senderDisplayName)s changed the room avatar to ",