address activitypub notes to the streamer's follower collection (#4314)

* make a new function to generate appropriate to and cc apub objects

* use new addressing function to set "public" message addressing appropriately with the followers collection

* early return from sending federated message if federation is disabled

* cleanup old addressing code, apply new addressing mechanism to live notifications as well

* linter fix

* Update activitypub/outbox/outbox.go

---------

Co-authored-by: Gabe Kangas <gabek@real-ity.com>
This commit is contained in:
mahmed2000
2025-05-07 17:35:12 -07:00
committed by GitHub
co-authored by Gabe Kangas
parent 6d97def04a
commit c9a69b281c
3 changed files with 43 additions and 11 deletions
+7
View File
@@ -16,6 +16,13 @@ func SendFederatedMessage(w http.ResponseWriter, r *http.Request) {
return
}
configRepository := configrepository.Get()
if !configRepository.GetFederationEnabled() {
webutils.WriteSimpleResponse(w, false, "Federation is disabled")
return
}
configValue, success := getValueFromRequest(w, r)
if !success {
return