commit 21fa6c7

default  ·  2023-04-23 12:33:53 +0000 UTC
parent 6d07c2b
Strip the query string in msg_follow().
1 files changed,  +3, -1
+3, -1
 1@@ -659,7 +659,7 @@ d_char *msg_delete(snac *snac, char *id)
 2 }
 3 
 4 
 5-xs_dict *msg_follow(snac *snac, const char *url_or_uid)
 6+xs_dict *msg_follow(snac *snac, const char *q)
 7 /* creates a 'Follow' message */
 8 {
 9     xs *actor_o = NULL;
10@@ -667,6 +667,8 @@ xs_dict *msg_follow(snac *snac, const char *url_or_uid)
11     d_char *msg = NULL;
12     int status;
13 
14+    xs *url_or_uid = xs_strip_i(xs_str_new(q));
15+
16     if (xs_startswith(url_or_uid, "https:/"))
17         actor = xs_dup(url_or_uid);
18     else