commit 135e690
default
·
2023-08-07 17:21:57 +0000 UTC
parent a3f1387
Limited users can announce our own posts.
1 files changed,
+4,
-4
+4,
-4
1@@ -1558,15 +1558,15 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
2 }
3 else
4 if (strcmp(type, "Announce") == 0) { /** **/
5- if (is_limited(snac, actor))
6+ if (xs_type(object) == XSTYPE_DICT)
7+ object = xs_dict_get(object, "id");
8+
9+ if (is_limited(snac, actor) && !xs_startswith(object, snac->actor))
10 snac_log(snac, xs_fmt("dropped 'Announce' from limited actor %s", actor));
11 else {
12 xs *a_msg = NULL;
13 xs *wrk = NULL;
14
15- if (xs_type(object) == XSTYPE_DICT)
16- object = xs_dict_get(object, "id");
17-
18 timeline_request(snac, &object, &wrk, 0);
19
20 if (valid_status(object_get(object, &a_msg))) {