Use single format for chat timestamps

This commit is contained in:
Cohee
2023-06-19 22:05:20 +03:00
parent 2d6ed116e6
commit fb97d95dae
2 changed files with 7 additions and 1 deletions

View File

@ -273,6 +273,10 @@ export function isOdd(number) {
}
export function timestampToMoment(timestamp) {
if (!timestamp) {
return moment.invalid();
}
// Unix time (legacy TAI)
if (typeof timestamp === 'number') {
return moment(timestamp);