commit 40b3f73

default  ·  2023-01-11 19:47:36 +0000 UTC
parent 75f8554
Deleted unused argument in timeline_admire().
4 files changed,  +6, -6
M data.c
M html.c
M snac.h
+2, -2
 1@@ -914,7 +914,7 @@ int process_message(snac *snac, char *msg, char *req)
 2         if (xs_type(object) == XSTYPE_DICT)
 3             object = xs_dict_get(object, "id");
 4 
 5-        timeline_admire(snac, msg, object, actor, 1);
 6+        timeline_admire(snac, object, actor, 1);
 7         snac_log(snac, xs_fmt("new 'Like' %s %s", actor, object));
 8         do_notify = 1;
 9     }
10@@ -936,7 +936,7 @@ int process_message(snac *snac, char *msg, char *req)
11                 xs *who_o = NULL;
12 
13                 if (valid_status(actor_request(snac, who, &who_o))) {
14-                    timeline_admire(snac, msg, object, actor, 0);
15+                    timeline_admire(snac, object, actor, 0);
16                     snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object));
17                     do_notify = 1;
18                 }
M data.c
+1, -1
1@@ -847,7 +847,7 @@ int timeline_add(snac *snac, char *id, char *o_msg)
2 }
3 
4 
5-void timeline_admire(snac *snac, char *o_msg, char *id, char *admirer, int like)
6+void timeline_admire(snac *snac, char *id, char *admirer, int like)
7 /* updates a timeline entry with a new admiration */
8 {
9     /* if we are admiring this, add to both timelines */
M html.c
+2, -2
 1@@ -1376,7 +1376,7 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
 2 
 3             if (msg != NULL) {
 4                 enqueue_message(&snac, msg);
 5-                timeline_admire(&snac, msg, xs_dict_get(msg, "object"), snac.actor, 1);
 6+                timeline_admire(&snac, xs_dict_get(msg, "object"), snac.actor, 1);
 7             }
 8         }
 9         else
10@@ -1385,7 +1385,7 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
11 
12             if (msg != NULL) {
13                 enqueue_message(&snac, msg);
14-                timeline_admire(&snac, msg, xs_dict_get(msg, "object"), snac.actor, 0);
15+                timeline_admire(&snac, xs_dict_get(msg, "object"), snac.actor, 0);
16             }
17         }
18         else
M snac.h
+1, -1
1@@ -92,7 +92,7 @@ int timeline_del(snac *snac, char *id);
2 d_char *timeline_simple_list(snac *snac, const char *idx_name, int skip, int show);
3 d_char *timeline_list(snac *snac, const char *idx_name, int skip, int show);
4 int timeline_add(snac *snac, char *id, char *o_msg);
5-void timeline_admire(snac *snac, char *o_msg, char *id, char *admirer, int like);
6+void timeline_admire(snac *snac, char *id, char *admirer, int like);
7 
8 d_char *timeline_top_level(d_char *list);
9