diff --git a/src/script/conversation/ConversationRepository.ts b/src/script/conversation/ConversationRepository.ts index af270b65a6e..01a66f16893 100644 --- a/src/script/conversation/ConversationRepository.ts +++ b/src/script/conversation/ConversationRepository.ts @@ -2255,7 +2255,7 @@ export class ConversationRepository { */ private async clearConversationContent(conversation: Conversation, timestamp: number) { await this.deleteMessages(conversation, timestamp); - await this.addCreationMessage(conversation, !!this.userState.self()?.isTemporaryGuest(), timestamp); + await this.addCreationMessage(conversation, !!this.userState.self()?.isTemporaryGuest()); conversation.setTimestamp(timestamp, Conversation.TIMESTAMP_TYPE.CLEARED); } diff --git a/src/script/conversation/EventBuilder.ts b/src/script/conversation/EventBuilder.ts index b122cb8982f..b6d80ede2c8 100644 --- a/src/script/conversation/EventBuilder.ts +++ b/src/script/conversation/EventBuilder.ts @@ -430,11 +430,11 @@ export const EventBuilder = { buildGroupCreation( conversationEntity: Conversation, isTemporaryGuest: boolean = false, - timestamp: number, + timestamp: number = 0, ): GroupCreationEvent { const {creator: creatorId} = conversationEntity; const selfUserId = conversationEntity.selfUser().id; - const isoDate = new Date(timestamp || 0).toISOString(); + const isoDate = new Date(timestamp).toISOString(); const userIds = conversationEntity.participating_user_ids().slice(); const createdBySelf = creatorId === selfUserId || isTemporaryGuest;