mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-29 18:09:05 +01:00
pass resolver when creating notes via side-effect
This commit is contained in:
parent
9d3321fca4
commit
9d5bc6cb28
1 changed files with 3 additions and 3 deletions
|
@ -165,7 +165,7 @@ export class ApInboxService {
|
||||||
} else if (isAnnounce(activity)) {
|
} else if (isAnnounce(activity)) {
|
||||||
return await this.announce(actor, activity, resolver);
|
return await this.announce(actor, activity, resolver);
|
||||||
} else if (isLike(activity)) {
|
} else if (isLike(activity)) {
|
||||||
return await this.like(actor, activity);
|
return await this.like(actor, activity, resolver);
|
||||||
} else if (isUndo(activity)) {
|
} else if (isUndo(activity)) {
|
||||||
return await this.undo(actor, activity, resolver);
|
return await this.undo(actor, activity, resolver);
|
||||||
} else if (isBlock(activity)) {
|
} else if (isBlock(activity)) {
|
||||||
|
@ -197,13 +197,13 @@ export class ApInboxService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
private async like(actor: MiRemoteUser, activity: ILike): Promise<string> {
|
private async like(actor: MiRemoteUser, activity: ILike, resolver?: Resolver): Promise<string> {
|
||||||
const targetUri = getApId(activity.object);
|
const targetUri = getApId(activity.object);
|
||||||
|
|
||||||
const object = fromTuple(activity.object);
|
const object = fromTuple(activity.object);
|
||||||
if (!object) return 'skip: activity has no object property';
|
if (!object) return 'skip: activity has no object property';
|
||||||
|
|
||||||
const note = await this.apNoteService.resolveNote(object);
|
const note = await this.apNoteService.resolveNote(object, { resolver });
|
||||||
if (!note) return `skip: target note not found ${targetUri}`;
|
if (!note) return `skip: target note not found ${targetUri}`;
|
||||||
|
|
||||||
await this.apNoteService.extractEmojis(activity.tag ?? [], actor.host).catch(() => null);
|
await this.apNoteService.extractEmojis(activity.tag ?? [], actor.host).catch(() => null);
|
||||||
|
|
Loading…
Reference in a new issue