Don't send follow request if the follow is already accepted

This commit is contained in:
Chocobozzz 2018-07-31 11:15:35 +02:00
parent 25e4d6ee97
commit 6104adc3e9
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 4 additions and 3 deletions

View file

@ -41,7 +41,7 @@ async function getOrCreateActorAndServerAndModel (activityActor: string | Activi
let actor = await ActorModel.loadByUrl(actorUrl)
// Orphan actor (not associated to an account of channel) so recreate it
if (!actor.Account && !actor.VideoChannel) {
if (actor && (!actor.Account && !actor.VideoChannel)) {
await actor.destroy()
actor = null
}