Fix timestamp bug for pending message and expand CSP for thumbnails

This commit is contained in:
sabaimran
2024-07-10 14:53:31 +05:30
parent 375685530f
commit 0369eb6e0e
3 changed files with 8 additions and 3 deletions

View File

@@ -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();