summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-06-07 11:39:13 +0200
committerdefault <nobody@localhost>2023-06-07 11:39:13 +0200
commite926fa23098f594b52d560f20043fd1a47329848 (patch)
treed3a632cc3696e28f16f15856c6f0b96b200c9f3a /activitypub.c
parentf90d4b23724f52c88d542fb6d688e3dd32ac6d65 (diff)
Changed timeline_request_replies() to receive an id and not an object.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/activitypub.c b/activitypub.c
index 06d4117..f9e7077 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -143,7 +143,7 @@ int actor_request(snac *snac, const char *actor, xs_dict **data)
}
-void timeline_request_replies(snac *user, const xs_dict *msg);
+void timeline_request_replies(snac *user, const char *id);
int timeline_request(snac *snac, char **id, xs_str **wrk)
/* ensures that an entry and its ancestors are in the timeline */
@@ -191,18 +191,22 @@ int timeline_request(snac *snac, char **id, xs_str **wrk)
}
}
- if (object)
- timeline_request_replies(snac, object);
+ timeline_request_replies(snac, *id);
}
return status;
}
-void timeline_request_replies(snac *user, const xs_dict *msg)
+void timeline_request_replies(snac *user, const char *id)
/* requests all replies of a message */
/* FIXME: experimental -- needs more testing */
{
+ xs *msg = NULL;
+
+ if (!valid_status(object_get(id, &msg)))
+ return;
+
/* does it have a replies collection? */
const xs_dict *replies = xs_dict_get(msg, "replies");
@@ -247,7 +251,7 @@ void timeline_request_replies(snac *user, const xs_dict *msg)
}
}
else
- snac_debug(user, 0, xs_fmt("reply collection get %s %d", next, status));
+ snac_debug(user, 0, xs_fmt("replies request error %s %d", next, status));
}
}
}