fix: DMs now show full date+time like channels [DD.MM.YYYY @ HH:MM]
This commit is contained in:
@@ -18,9 +18,12 @@ import { ExpandableImage } from "./ExpandableImage.tsx";
|
||||
|
||||
function formatTime(iso: string): string {
|
||||
const date = new Date(iso);
|
||||
const day = date.getDate().toString().padStart(2, "0");
|
||||
const month = (date.getMonth() + 1).toString().padStart(2, "0");
|
||||
const year = date.getFullYear();
|
||||
const hours = date.getHours().toString().padStart(2, "0");
|
||||
const minutes = date.getMinutes().toString().padStart(2, "0");
|
||||
return `${hours}:${minutes}`;
|
||||
return `[${day}.${month}.${year} @ ${hours}:${minutes}]`;
|
||||
}
|
||||
|
||||
function renderDMContent(content: string) {
|
||||
|
||||
Reference in New Issue
Block a user