refactor: introduce bindThis decorator to bind this automaticaly
This commit is contained in:
parent
e73581f715
commit
bbb49457f9
199 changed files with 969 additions and 96 deletions
|
@ -24,6 +24,7 @@ import { UtilityService } from '@/core/UtilityService.js';
|
|||
import { ApPersonService } from '@/core/activitypub/models/ApPersonService.js';
|
||||
import { LdSignatureService } from '@/core/activitypub/LdSignatureService.js';
|
||||
import { ApInboxService } from '@/core/activitypub/ApInboxService.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { QueueLoggerService } from '../QueueLoggerService.js';
|
||||
import type Bull from 'bull';
|
||||
import type { DeliverJobData, InboxJobData } from '../types.js';
|
||||
|
@ -60,6 +61,7 @@ export class InboxProcessorService {
|
|||
this.logger = this.queueLoggerService.logger.createSubLogger('inbox');
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async process(job: Bull.Job<InboxJobData>): Promise<string> {
|
||||
const signature = job.data.signature; // HTTP-signature
|
||||
const activity = job.data.activity;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue