Remove threadId defined assertion as it could not be in messaging sync

This commit is contained in:
Charles Bochet
2024-06-09 00:56:59 +02:00
parent f2cd65557e
commit 9ebf7a61ab

View File

@ -100,7 +100,7 @@ export class MessagingGmailFetchMessagesByBatchesService {
if (!from) {
this.logger.log(
`From value is missing while importing message in workspace ${workspaceId} and account ${connectedAccountId}`,
`From value is missing while importing message #${id} in workspace ${workspaceId} and account ${connectedAccountId}`,
);
return null;
@ -108,7 +108,7 @@ export class MessagingGmailFetchMessagesByBatchesService {
if (!to && !deliveredTo && !bcc && !cc) {
this.logger.log(
`To, Delivered-To, Bcc or Cc value is missing while importing message in workspace ${workspaceId} and account ${connectedAccountId}`,
`To, Delivered-To, Bcc or Cc value is missing while importing message #${id} in workspace ${workspaceId} and account ${connectedAccountId}`,
);
return null;
@ -116,7 +116,15 @@ export class MessagingGmailFetchMessagesByBatchesService {
if (!headerMessageId) {
this.logger.log(
`Header Message ID is missing while importing message in workspace ${workspaceId} and account ${connectedAccountId}`,
`Message-ID is missing while importing message #${id} in workspace ${workspaceId} and account ${connectedAccountId}`,
);
return null;
}
if (!threadId) {
this.logger.log(
`Thread Id is missing while importing message #${id} in workspace ${workspaceId} and account ${connectedAccountId}`,
);
return null;
@ -190,7 +198,6 @@ export class MessagingGmailFetchMessagesByBatchesService {
const internalDate = message.internalDate;
assert(id, 'ID is missing');
assert(threadId, 'Thread-ID is missing');
assert(historyId, 'History-ID is missing');
assert(internalDate, 'Internal date is missing');