commit 3c7cccb
default
·
2022-11-28 10:06:46 +0000 UTC
parent 2fab441
Changed following_list() to return a list of actors.
M
data.c
+12,
-2
1@@ -1146,6 +1146,12 @@ void timeline_admire(snac *snac, char *id, char *admirer, int like)
2 }
3
4
5+/** following **/
6+
7+/* this needs special treatment and cannot use the object db as is,
8+ with a link to a cached author, because we need the Follow object
9+ in case we need to unfollow (Undo + original Follow) */
10+
11 d_char *_following_fn(snac *snac, char *actor)
12 {
13 xs *md5 = xs_md5_hex(actor, strlen(actor));
14@@ -1242,8 +1248,12 @@ d_char *following_list(snac *snac)
15 if (o != NULL) {
16 char *type = xs_dict_get(o, "type");
17
18- if (!xs_is_null(type) && strcmp(type, "Accept") == 0)
19- list = xs_list_append(list, o);
20+ if (!xs_is_null(type) && strcmp(type, "Accept") == 0) {
21+ char *actor = xs_dict_get(o, "actor");
22+
23+ if (!xs_is_null(actor))
24+ list = xs_list_append(list, actor);
25+ }
26 }
27 }
28 }
M
html.c
+1,
-1
1@@ -938,7 +938,7 @@ d_char *html_people(snac *snac)
2
3 s = html_user_header(snac, s, 0);
4
5-// s = html_people_list(snac, s, wing, L("People you follow"), "i");
6+ s = html_people_list(snac, s, wing, L("People you follow"), "i");
7
8 s = html_people_list(snac, s, wers, L("People that follows you"), "e");
9