summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-04-23 14:33:53 +0200
committerdefault <nobody@localhost>2023-04-23 14:33:53 +0200
commit21fa6c7904bfd0e74b2251409f0c65d2c0aabe02 (patch)
treea4dbb640307df49ec252f63adfbe7987ec2fd33c /activitypub.c
parent6d07c2ba3166c933b9e727c0c5c30b69cda93644 (diff)
Strip the query string in msg_follow().
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c
index 73225ac..b20ae0f 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -659,7 +659,7 @@ d_char *msg_delete(snac *snac, char *id)
}
-xs_dict *msg_follow(snac *snac, const char *url_or_uid)
+xs_dict *msg_follow(snac *snac, const char *q)
/* creates a 'Follow' message */
{
xs *actor_o = NULL;
@@ -667,6 +667,8 @@ xs_dict *msg_follow(snac *snac, const char *url_or_uid)
d_char *msg = NULL;
int status;
+ xs *url_or_uid = xs_strip_i(xs_str_new(q));
+
if (xs_startswith(url_or_uid, "https:/"))
actor = xs_dup(url_or_uid);
else