mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-14 09:35:04 +00:00
Only reply to direct Ping activities.
This commit is contained in:
parent
f0a032044b
commit
840fde45f1
1 changed files with 6 additions and 0 deletions
|
@ -659,6 +659,12 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
|
|||
return !xs_is_null(object) && strcmp(snac->actor, object) == 0;
|
||||
}
|
||||
|
||||
/* only accept Ping directed to us */
|
||||
if (xs_match(type, "Ping")) {
|
||||
char *dest = xs_dict_get(c_msg, "to");
|
||||
return !xs_is_null(dest) && strcmp(snac->actor, dest) == 0;
|
||||
}
|
||||
|
||||
/* if it's not a Create or Update, allow as is */
|
||||
if (!xs_match(type, "Create|Update")) {
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue