hunk.code_window: import { Injectable } from '@nestjs/common';
   import {
     MessageTemplateRepository,
     NotificationTemplateRepository,
  
hunk.labels: replace keep keep keep
hunk.after_edit: import { Inject, Injectable } from '@nestjs/common';
  
hunk.file_path: apps/api/src/app/widgets/usecases/get-subscriber-preference/get-subscriber-preference.usecase.ts
hunk.type: replace
file: import { Injectable } from '@nestjs/common';
  import { JobStatusEnum } from '@novu/dal';
  import { SendMessageCommand } from '../send-message.command';
  import { StepTypeEnum } from '@novu/shared';
  import { GetDigestEvents } from './get-digest-events.usecase';
  
  @Injectable()
  export class GetDigestEventsBackoff extends GetDigestEvents {
    public async execute(command: SendMessageCommand) {
      const currentJob = await this.jobRepository.findOne({
        _id: command.jobId,
      });
  
      const jobs = await this.jobRepository.find({
        createdAt: {
          $gte: currentJob.createdAt,
        },
        _templateId: currentJob._templateId,
        status: JobStatusEnum.COMPLETED,
        type: StepTypeEnum.TRIGGER,
        _environmentId: command.environmentId,
        _subscriberId: command.subscriberId,
      });
  
      return this.filterJobs(currentJob, command.transactionId, jobs);
    }
  }
  