summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--activitypub.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c
index 39d1605..57c3259 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1045,6 +1045,16 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
1045 return 1; 1045 return 1;
1046 } 1046 }
1047 1047
1048 /* if it's a DM from someone we don't follow, reject the message */
1049 if (xs_type(xs_dict_get(snac->config, "drop_dm_from_unknown")) == XSTYPE_TRUE) {
1050 if (strcmp(utype, "Note") == 0 && !is_msg_public(snac, msg) &&
1051 !following_check(snac, actor)) {
1052 snac_log(snac, xs_fmt("DM rejected from unknown actor %s", actor));
1053
1054 return 1;
1055 }
1056 }
1057
1048 /* bring the actor */ 1058 /* bring the actor */
1049 a_status = actor_request(snac, actor, &actor_o); 1059 a_status = actor_request(snac, actor, &actor_o);
1050 1060