hunk.code_window:       channel: command.channelType,
         _environmentId: command.environmentId,
       });
       if (activeIntegrationsCount > 0) {
         return [];
       }
       const messagesCount = await this.messageRepository.count({
         channel: command.channelType,
         _organizationId: command.organizationId,
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:       return;
  
hunk.file_path: apps/api/src/app/integrations/usecases/get-novu-integration/get-novu-integration.usecase.ts
hunk.type: replace
file: import { Injectable } from '@nestjs/common';
  import { SendMessageType } from './send-message-type.usecase';
  import { CreateLog } from '../../../logs/usecases/create-log/create-log.usecase';
  import { SendMessageCommand } from './send-message.command';
  import { MessageRepository } from '@novu/dal';
  import { CreateExecutionDetails } from '../../../execution-details/usecases/create-execution-details/create-execution-details.usecase';
  import {
    CreateExecutionDetailsCommand,
    DetailEnum,
  } from '../../../execution-details/usecases/create-execution-details/create-execution-details.command';
  import { ExecutionDetailsSourceEnum, ExecutionDetailsStatusEnum } from '@novu/shared';
  
  @Injectable()
  export class SendMessageDelay extends SendMessageType {
    constructor(
      protected messageRepository: MessageRepository,
      protected createLogUsecase: CreateLog,
      protected createExecutionDetails: CreateExecutionDetails
    ) {
      super(messageRepository, createLogUsecase, createExecutionDetails);
    }
  
    public async execute(command: SendMessageCommand) {
      await this.createExecutionDetails.execute(
        CreateExecutionDetailsCommand.create({
          ...CreateExecutionDetailsCommand.getDetailsFromJob(command.job),
          detail: DetailEnum.DELAY_FINISHED,
          source: ExecutionDetailsSourceEnum.INTERNAL,
          status: ExecutionDetailsStatusEnum.SUCCESS,
          isTest: false,
          isRetry: false,
        })
      );
    }
  }
  