X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Fsend%2Fsend-follow.ts;h=9219640ddaae85cb8733e5c5ff6d44d7a78b02ca;hb=4d7ce9218a3f695bf3d013cbdce1c5c6a5221927;hp=6b17b25da188d7f3d2cafae5d13a021048339b9d;hpb=001ed2d40c8d2c8f494f5dc7f91ed62d56df10fd;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/send/send-follow.ts b/server/lib/activitypub/send/send-follow.ts index 6b17b25da..9219640dd 100644 --- a/server/lib/activitypub/send/send-follow.ts +++ b/server/lib/activitypub/send/send-follow.ts @@ -1,10 +1,8 @@ +import { Transaction } from 'sequelize' import { ActivityFollow } from '../../../../shared/models/activitypub' -import { ActorFollowModel } from '../../../models/activitypub/actor-follow' -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 @@ -15,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)) }