diff options
| author | 2022-11-28 10:46:42 +0100 | |
|---|---|---|
| committer | 2022-11-28 10:46:42 +0100 | |
| commit | 07fec7127326cf02d50bd148581908d51cc697f6 (patch) | |
| tree | c62856673c0e80a71782fa3bd4f8452e5132638e /activitypub.c | |
| parent | New function object_user_cache_in(). (diff) | |
| download | snac2-07fec7127326cf02d50bd148581908d51cc697f6.tar.gz snac2-07fec7127326cf02d50bd148581908d51cc697f6.tar.xz snac2-07fec7127326cf02d50bd148581908d51cc697f6.zip | |
Upgraded followers to the new db.
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/activitypub.c b/activitypub.c index 7360af1..d22261d 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -192,12 +192,10 @@ d_char *recipient_list(snac *snac, char *msg, int expand_public) | |||
| 192 | if (expand_public && strcmp(v, public_address) == 0) { | 192 | if (expand_public && strcmp(v, public_address) == 0) { |
| 193 | /* iterate the followers and add them */ | 193 | /* iterate the followers and add them */ |
| 194 | xs *fwers = follower_list(snac); | 194 | xs *fwers = follower_list(snac); |
| 195 | char *fw; | 195 | char *actor; |
| 196 | 196 | ||
| 197 | char *p = fwers; | 197 | char *p = fwers; |
| 198 | while (xs_list_iter(&p, &fw)) { | 198 | while (xs_list_iter(&p, &actor)) { |
| 199 | char *actor = xs_dict_get(fw, "actor"); | ||
| 200 | |||
| 201 | if (xs_list_in(list, actor) == -1) | 199 | if (xs_list_in(list, actor) == -1) |
| 202 | list = xs_list_append(list, actor); | 200 | list = xs_list_append(list, actor); |
| 203 | } | 201 | } |
| @@ -832,7 +830,7 @@ int process_message(snac *snac, char *msg, char *req) | |||
| 832 | 830 | ||
| 833 | timeline_add(snac, xs_dict_get(f_msg, "id"), f_msg, NULL, NULL); | 831 | timeline_add(snac, xs_dict_get(f_msg, "id"), f_msg, NULL, NULL); |
| 834 | 832 | ||
| 835 | follower_add(snac, actor, f_msg); | 833 | follower_add(snac, actor); |
| 836 | 834 | ||
| 837 | snac_log(snac, xs_fmt("New follower %s", actor)); | 835 | snac_log(snac, xs_fmt("New follower %s", actor)); |
| 838 | do_notify = 1; | 836 | do_notify = 1; |