summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c
index c6cf445..1c49f82 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1484,6 +1484,17 @@ int activitypub_post_handler(d_char *req, char *q_path,
1484 } 1484 }
1485 } 1485 }
1486 1486
1487 /* if the message is from a muted actor, reject it right now */
1488 if (!xs_is_null(v = xs_dict_get(msg, "actor")) && *v) {
1489 if (is_muted(&snac, v)) {
1490 srv_log(xs_fmt("rejected message from MUTEd actor %s", v));
1491
1492 *body = xs_str_new("rejected");
1493 *ctype = "text/plain";
1494 status = 403;
1495 }
1496 }
1497
1487 if (valid_status(status)) { 1498 if (valid_status(status)) {
1488 enqueue_input(&snac, msg, req, 0); 1499 enqueue_input(&snac, msg, req, 0);
1489 *ctype = "application/activity+json"; 1500 *ctype = "application/activity+json";