mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Strip the query string in msg_follow().
This commit is contained in:
parent
6d07c2ba31
commit
21fa6c7904
1 changed files with 3 additions and 1 deletions
|
@ -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 */
|
/* creates a 'Follow' message */
|
||||||
{
|
{
|
||||||
xs *actor_o = NULL;
|
xs *actor_o = NULL;
|
||||||
|
@ -667,6 +667,8 @@ xs_dict *msg_follow(snac *snac, const char *url_or_uid)
|
||||||
d_char *msg = NULL;
|
d_char *msg = NULL;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
xs *url_or_uid = xs_strip_i(xs_str_new(q));
|
||||||
|
|
||||||
if (xs_startswith(url_or_uid, "https:/"))
|
if (xs_startswith(url_or_uid, "https:/"))
|
||||||
actor = xs_dup(url_or_uid);
|
actor = xs_dup(url_or_uid);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue