Some fixes to limiting actors.

This commit is contained in:
default 2023-08-07 06:35:31 +02:00
parent 4d9dfa9bf2
commit bf79c8c370

View file

@ -1558,6 +1558,9 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
}
else
if (strcmp(type, "Announce") == 0) { /** **/
if (is_limited(snac, actor))
snac_log(snac, xs_fmt("dropped 'Announce' from limited actor %s", actor));
else {
xs *a_msg = NULL;
xs *wrk = NULL;
@ -1566,9 +1569,6 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
timeline_request(snac, &object, &wrk, 0);
if (is_limited(snac, actor))
snac_log(snac, xs_fmt("dropped 'Announce' from limited actor %s", actor));
else
if (valid_status(object_get(object, &a_msg))) {
const char *who = xs_dict_get(a_msg, "attributedTo");
@ -1590,6 +1590,7 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
else
snac_debug(snac, 1, xs_fmt("error requesting 'Announce' object %s", object));
}
}
else
if (strcmp(type, "Update") == 0) { /** **/
if (strcmp(utype, "Person") == 0 || strcmp(utype, "Service") == 0) {