commit 43d2e80
default
·
2023-07-14 07:05:27 +0000 UTC
parent eee1916
Use the right object id when storing Announce + Create + Note objects.
1 files changed,
+5,
-3
+5,
-3
1@@ -177,12 +177,14 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level)
2 if (xs_is_null(type))
3 type = "(null)";
4
5- srv_debug(0, xs_fmt("timeline_request type %s '%s'", *id, type));
6+ srv_debug(0, xs_fmt("timeline_request type %s '%s'", nid, type));
7
8 if (strcmp(type, "Create") == 0) {
9 /* some software like lemmy nest Announce + Create + Note */
10- if (!xs_is_null(object = xs_dict_get(object, "object")))
11+ if (!xs_is_null(object = xs_dict_get(object, "object"))) {
12 type = xs_dict_get(object, "type");
13+ nid = xs_dict_get(object, "id");
14+ }
15 else
16 type = "(null)";
17 }
18@@ -198,7 +200,7 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level)
19 char *in_reply_to = xs_dict_get(object, "inReplyTo");
20
21 /* store */
22- timeline_add(snac, *id, object);
23+ timeline_add(snac, nid, object);
24
25 /* recurse! */
26 if (level < 32)