commit 840fde4
default
·
2024-03-24 05:23:48 +0000 UTC
parent f0a0320
Only reply to direct Ping activities.
1 files changed,
+6,
-0
+6,
-0
1@@ -659,6 +659,12 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
2 return !xs_is_null(object) && strcmp(snac->actor, object) == 0;
3 }
4
5+ /* only accept Ping directed to us */
6+ if (xs_match(type, "Ping")) {
7+ char *dest = xs_dict_get(c_msg, "to");
8+ return !xs_is_null(dest) && strcmp(snac->actor, dest) == 0;
9+ }
10+
11 /* if it's not a Create or Update, allow as is */
12 if (!xs_match(type, "Create|Update")) {
13 return 1;