X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fsend%2Fsend-accept.ts;h=4c9bcbb0b3f99086733be1e4d908f412fee85773;hb=bae616273d455d225d131eb17c56db6c20a0b6b3;hp=bb387e2c0e2b65ceab254bba2ef48868b180897d;hpb=de94ac86a211dec657332d964693857ec235ce40;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/send/send-accept.ts b/server/lib/activitypub/send/send-accept.ts index bb387e2c0..4c9bcbb0b 100644 --- a/server/lib/activitypub/send/send-accept.ts +++ b/server/lib/activitypub/send/send-accept.ts @@ -1,9 +1,9 @@ -import { ActivityAccept, ActivityFollow } from '../../../../shared/models/activitypub' +import { ActivityAccept, ActivityFollow } from '@shared/models' import { logger } from '../../../helpers/logger' import { MActor, MActorFollowActors } from '../../../types/models' import { getLocalActorFollowAcceptActivityPubUrl } from '../url' import { buildFollowActivity } from './send-follow' -import { unicastTo } from './utils' +import { unicastTo } from './shared/send-utils' function sendAccept (actorFollow: MActorFollowActors) { const follower = actorFollow.ActorFollower @@ -21,7 +21,12 @@ function sendAccept (actorFollow: MActorFollowActors) { const url = getLocalActorFollowAcceptActivityPubUrl(actorFollow) const data = buildAcceptActivity(url, me, followData) - return unicastTo(data, me, follower.inboxUrl) + return unicastTo({ + data, + byActor: me, + toActorUrl: follower.inboxUrl, + contextType: 'Accept' + }) } // ---------------------------------------------------------------------------