diff --git a/activitypub/activitypub.go b/activitypub/activitypub.go index 0d80a5afe..ac41e2a90 100644 --- a/activitypub/activitypub.go +++ b/activitypub/activitypub.go @@ -19,7 +19,7 @@ func Start(datastore *data.Datastore) { inbox.InitInboxWorkerPool() StartRouter() - // Test + // Generate the keys for signing federated activity if needed. if data.GetPrivateKey() == "" { privateKey, publicKey, err := crypto.GenerateKeys() _ = data.SetPrivateKey(string(privateKey)) diff --git a/activitypub/controllers/followers.go b/activitypub/controllers/followers.go index 22e60c6dc..11193f51a 100644 --- a/activitypub/controllers/followers.go +++ b/activitypub/controllers/followers.go @@ -25,7 +25,7 @@ const ( // FollowersHandler will return the list of remote followers on the Fediverse. func FollowersHandler(w http.ResponseWriter, r *http.Request) { - if r.Method != "GET" { + if r.Method != http.MethodGet { w.WriteHeader(http.StatusMethodNotAllowed) return }