aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFChannel <=>2021-01-28 16:13:26 -0800
committerFChannel <=>2021-01-28 16:13:26 -0800
commit78cbbad268b88e6517a1e298ab66a99f8d3f8704 (patch)
tree140a0fac5ba0a1d84bb46088e0ec356195d00706
parentc052a31eacc50ce61dced6f42fec66040329b55f (diff)
reject activity
-rw-r--r--Follow.go2
-rw-r--r--OutboxPost.go4
2 files changed, 4 insertions, 2 deletions
diff --git a/Follow.go b/Follow.go
index f672449..667c6bd 100644
--- a/Follow.go
+++ b/Follow.go
@@ -135,7 +135,7 @@ func AcceptFollow(activity Activity) Activity {
return accept
}
-func RejectFollow(activity Activity) Activity {
+func RejectActivity(activity Activity) Activity {
var accept Activity
accept.AtContext.Context = activity.AtContext.Context
accept.Type = "Reject"
diff --git a/OutboxPost.go b/OutboxPost.go
index c2bf7fe..16d9f5f 100644
--- a/OutboxPost.go
+++ b/OutboxPost.go
@@ -512,6 +512,8 @@ func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) {
}
if !RemoteActorHasAuth(activity.Actor.Id, auth[1]) {
+ response := RejectActivity(activity)
+ MakeActivityRequest(db, response)
return
}
@@ -545,7 +547,7 @@ func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) {
MakeActivityRequest(db, response)
} else {
fmt.Println("follow request for rejected")
- response := RejectFollow(activity)
+ response := RejectActivity(activity)
MakeActivityRequest(db, response)
}
}