Commit 6b862fe2 authored by zauberstuhl's avatar zauberstuhl

Dispatch non local posts at least once

parent 1b161831
Pipeline #424 passed with stages
in 16 minutes and 24 seconds
......@@ -93,14 +93,11 @@ func (dispatcher *Dispatcher) findRecipients(parentPost *models.Post, parentUser
return persons, nil
}
} else if parentPost != nil {
if parentPost.Public {
// everyone we are sharing with
return dispatcher.findPublicEndpoints()
} else {
// it is not local just send it to
// the remote server it should handle the rest
// it is not local just send it to
// the remote server it should handle the rest
var persons = []models.Person{parentPost.Person}
if !parentPost.Public {
// in case of AP we will fetch known visibilties as well
var persons = []models.Person{parentPost.Person}
var visibilities models.Visibilities
err := visibilities.FindByPost(*parentPost)
if err == nil {
......@@ -110,8 +107,8 @@ func (dispatcher *Dispatcher) findRecipients(parentPost *models.Post, parentUser
} else {
revel.AppLog.Error("Dispatcher findRecipients", err.Error(), err)
}
return persons, nil
}
return persons, nil
}
return []models.Person{}, nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment