X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fsend%2Fsend-follow.ts;h=9219640ddaae85cb8733e5c5ff6d44d7a78b02ca;hb=4d7ce9218a3f695bf3d013cbdce1c5c6a5221927;hp=ce400d8fffa4196412e75238a9f2bef5e964aa0c;hpb=8c559fad1e1c4c2ab7f1388c73200aa4c6256d74;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/send/send-follow.ts b/server/lib/activitypub/send/send-follow.ts index ce400d8ff..9219640dd 100644 --- a/server/lib/activitypub/send/send-follow.ts +++ b/server/lib/activitypub/send/send-follow.ts @@ -1,9 +1,8 @@ +import { Transaction } from 'sequelize' import { ActivityFollow } from '../../../../shared/models/activitypub' -import { getActorFollowActivityPubUrl } from '../url' -import { unicastTo } from './utils' import { logger } from '../../../helpers/logger' -import { Transaction } from 'sequelize' -import { MActor, MActorFollowActors } from '../../../typings/models' +import { MActor, MActorFollowActors } from '../../../types/models' +import { unicastTo } from './utils' function sendFollow (actorFollow: MActorFollowActors, t: Transaction) { const me = actorFollow.ActorFollower @@ -14,8 +13,7 @@ function sendFollow (actorFollow: MActorFollowActors, t: Transaction) { logger.info('Creating job to send follow request to %s.', following.url) - const url = getActorFollowActivityPubUrl(me, following) - const data = buildFollowActivity(url, me, following) + const data = buildFollowActivity(actorFollow.url, me, following) t.afterCommit(() => unicastTo(data, me, following.inboxUrl)) }