Explorar o código

Strip the query string in msg_follow().

default %!s(int64=3) %!d(string=hai) anos
pai
achega
21fa6c7904
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      activitypub.c

+ 3 - 1
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