Fix message import scheduled (#16071)
Co-authored-by: neo773 <neo773@protonmail.com>
This commit is contained in:
+3
-3
@@ -49,7 +49,7 @@ describe('MessagingMessagesImportService', () => {
|
||||
|
||||
mockMessageChannel = {
|
||||
id: 'message-channel-id',
|
||||
syncStage: MessageChannelSyncStage.MESSAGES_IMPORT_PENDING,
|
||||
syncStage: MessageChannelSyncStage.MESSAGES_IMPORT_SCHEDULED,
|
||||
connectedAccountId: mockConnectedAccount.id,
|
||||
handle: 'test@gmail.com',
|
||||
} as MessageChannelWorkspaceEntity;
|
||||
@@ -192,9 +192,9 @@ describe('MessagingMessagesImportService', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('should fails if SyncStage is not MESSAGES_IMPORT_PENDING', async () => {
|
||||
it('should fails if SyncStage is not MESSAGES_IMPORT_SCHEDULED', async () => {
|
||||
mockMessageChannel.syncStage =
|
||||
MessageChannelSyncStage.MESSAGE_LIST_FETCH_PENDING;
|
||||
MessageChannelSyncStage.MESSAGES_IMPORT_PENDING;
|
||||
|
||||
expect(
|
||||
service.processMessageBatchImport(
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ export class MessagingMessagesImportService {
|
||||
try {
|
||||
if (
|
||||
messageChannel.syncStage !==
|
||||
MessageChannelSyncStage.MESSAGES_IMPORT_PENDING
|
||||
MessageChannelSyncStage.MESSAGES_IMPORT_SCHEDULED
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user