FIX: Invalid date when sending chat message in thread (#24455)

Fixes a minor issue where "Invalid date" is shown briefly
when sending a message in a chat thread. Change to use
`new Date()` instead like the channel staged message which
does not have this issue.
This commit is contained in:
Martin Brennan 2023-11-20 19:21:39 +10:00 committed by GitHub
parent 190a7f8c7a
commit 7cf59dc8fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ export default class ChatThread {
message.staged = true;
message.processed = false;
message.draft = false;
message.createdAt ??= moment.utc().format();
message.createdAt = new Date();
message.thread = this;
this.messagesManager.addMessages([message]);