commit 21fa6c7904bfd0e74b2251409f0c65d2c0aabe02
parent 6d07c2ba3166c933b9e727c0c5c30b69cda93644
Author: default <nobody@localhost>
Date: Sun, 23 Apr 2023 14:33:53 +0200
Strip the query string in msg_follow().
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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