diff --git a/src/equicordplugins/customTimestamps/index.tsx b/src/equicordplugins/customTimestamps/index.tsx index 9644c091..26078f2c 100644 --- a/src/equicordplugins/customTimestamps/index.tsx +++ b/src/equicordplugins/customTimestamps/index.tsx @@ -66,19 +66,21 @@ export default definePlugin({ ), - patches: [{ - find: "#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}", - replacement: [ - { - match: /(?<=\i=\i\?)\(0,\i\.\i\)\((\i),"LT"\):\(0,\i\.\i\)\(\i\)/, - replace: '$self.format($1,"compactFormat","[calendar]"):$self.format($1,"cozyFormat","LT")', - }, - { - match: /(?<=text:)\(0,\i.\i\)\((\i),"LLLL"\)(?=,)/, - replace: '$self.format($1,"tooltipFormat","LLLL")', - }, - ] - }], + patches: [ + { + find: "#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}", + replacement: [ + { + match: /(?<=\i=\i\?)\(0,\i\.\i\)\((\i),"LT"\):\(0,\i\.\i\)\(\i,!0\)/, + replace: '$self.format($1,"compactFormat","[calendar]"):$self.format($1,"cozyFormat","LT")', + }, + { + match: /(?<=text:)\(0,\i.\i\)\((\i),"LLLL"\)(?=,)/, + replace: '$self.format($1,"tooltipFormat","LLLL")', + }, + ] + } + ], format(date: Date, key: string, fallback: string) { const t = moment(date);