mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Fix timestamp bug for pending message and expand CSP for thumbnails
This commit is contained in:
@@ -267,7 +267,12 @@ export default function ChatMessage(props: ChatMessageProps) {
|
||||
}
|
||||
|
||||
function renderTimeStamp(timestamp: string) {
|
||||
const messageDateTime = new Date(timestamp + 'Z');
|
||||
|
||||
console.log("INCOMING TIMESTAMP", timestamp);
|
||||
if (!timestamp.endsWith('Z')) {
|
||||
timestamp = timestamp + 'Z';
|
||||
}
|
||||
const messageDateTime = new Date(timestamp);
|
||||
const currentDataTime = new Date();
|
||||
const timeDiff = currentDataTime.getTime() - messageDateTime.getTime();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user