summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-07-14 09:05:27 +0200
committerdefault <nobody@localhost>2023-07-14 09:05:27 +0200
commit43d2e80dc55b1bdea7ca31b5350eefc56a62fffe (patch)
tree31af6daf3f512a49973a5615a3f66491289b0b3a /activitypub.c
parenteee19168580fdf228b4829da89725d394159fd60 (diff)
Use the right object id when storing Announce + Create + Note objects.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c
index 0b621d4..665d54e 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -177,12 +177,14 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level)
if (xs_is_null(type))
type = "(null)";
- srv_debug(0, xs_fmt("timeline_request type %s '%s'", *id, type));
+ srv_debug(0, xs_fmt("timeline_request type %s '%s'", nid, type));
if (strcmp(type, "Create") == 0) {
/* some software like lemmy nest Announce + Create + Note */
- if (!xs_is_null(object = xs_dict_get(object, "object")))
+ if (!xs_is_null(object = xs_dict_get(object, "object"))) {
type = xs_dict_get(object, "type");
+ nid = xs_dict_get(object, "id");
+ }
else
type = "(null)";
}
@@ -198,7 +200,7 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level)
char *in_reply_to = xs_dict_get(object, "inReplyTo");
/* store */
- timeline_add(snac, *id, object);
+ timeline_add(snac, nid, object);
/* recurse! */
if (level < 32)