diff options
| author | 2023-04-23 14:33:53 +0200 | |
|---|---|---|
| committer | 2023-04-23 14:33:53 +0200 | |
| commit | 21fa6c7904bfd0e74b2251409f0c65d2c0aabe02 (patch) | |
| tree | a4dbb640307df49ec252f63adfbe7987ec2fd33c | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-21fa6c7904bfd0e74b2251409f0c65d2c0aabe02.tar.gz snac2-21fa6c7904bfd0e74b2251409f0c65d2c0aabe02.tar.xz snac2-21fa6c7904bfd0e74b2251409f0c65d2c0aabe02.zip | |
Strip the query string in msg_follow().
| -rw-r--r-- | activitypub.c | 4 |
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) | |||
| 659 | } | 659 | } |
| 660 | 660 | ||
| 661 | 661 | ||
| 662 | xs_dict *msg_follow(snac *snac, const char *url_or_uid) | 662 | xs_dict *msg_follow(snac *snac, const char *q) |
| 663 | /* creates a 'Follow' message */ | 663 | /* creates a 'Follow' message */ |
| 664 | { | 664 | { |
| 665 | xs *actor_o = NULL; | 665 | xs *actor_o = NULL; |
| @@ -667,6 +667,8 @@ xs_dict *msg_follow(snac *snac, const char *url_or_uid) | |||
| 667 | d_char *msg = NULL; | 667 | d_char *msg = NULL; |
| 668 | int status; | 668 | int status; |
| 669 | 669 | ||
| 670 | xs *url_or_uid = xs_strip_i(xs_str_new(q)); | ||
| 671 | |||
| 670 | if (xs_startswith(url_or_uid, "https:/")) | 672 | if (xs_startswith(url_or_uid, "https:/")) |
| 671 | actor = xs_dup(url_or_uid); | 673 | actor = xs_dup(url_or_uid); |
| 672 | else | 674 | else |