Browse Source

Deleted unused arguments in timeline_add().

default 2 years ago
parent
commit
75f8554e38
5 changed files with 7 additions and 7 deletions
  1. 3 3
      activitypub.c
  2. 1 1
      data.c
  3. 1 1
      html.c
  4. 1 1
      main.c
  5. 1 1
      snac.h

+ 3 - 3
activitypub.c

@@ -119,7 +119,7 @@ int timeline_request(snac *snac, char **id, char *referrer, d_char **wrk)
                     timeline_request(snac, &in_reply_to, referrer, NULL);
 
                     /* finally store */
-                    timeline_add(snac, *id, object, in_reply_to, referrer);
+                    timeline_add(snac, *id, object);
                 }
             }
         }
@@ -852,7 +852,7 @@ int process_message(snac *snac, char *msg, char *req)
                 f_msg = xs_dict_set(f_msg, "published", date);
             }
 
-            timeline_add(snac, xs_dict_get(f_msg, "id"), f_msg, NULL, NULL);
+            timeline_add(snac, xs_dict_get(f_msg, "id"), f_msg);
 
             follower_add(snac, actor);
 
@@ -887,7 +887,7 @@ int process_message(snac *snac, char *msg, char *req)
 
                 timeline_request(snac, &in_reply_to, NULL, &wrk);
 
-                if (timeline_add(snac, id, object, in_reply_to, NULL)) {
+                if (timeline_add(snac, id, object)) {
                     snac_log(snac, xs_fmt("new 'Note' %s %s", actor, id));
                     do_notify = 1;
                 }

+ 1 - 1
data.c

@@ -835,7 +835,7 @@ void timeline_update_indexes(snac *snac, const char *id)
 }
 
 
-int timeline_add(snac *snac, char *id, char *o_msg, char *parent, char *referrer)
+int timeline_add(snac *snac, char *id, char *o_msg)
 /* adds a message to the timeline */
 {
     int ret = object_add(id, o_msg);

+ 1 - 1
html.c

@@ -1352,7 +1352,7 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
 
             enqueue_message(&snac, c_msg);
 
-            timeline_add(&snac, xs_dict_get(msg, "id"), msg, in_reply_to, NULL);
+            timeline_add(&snac, xs_dict_get(msg, "id"), msg);
         }
 
         status = 303;

+ 1 - 1
main.c

@@ -292,7 +292,7 @@ int main(int argc, char *argv[])
 
         enqueue_message(&snac, c_msg);
 
-        timeline_add(&snac, xs_dict_get(msg, "id"), msg, in_reply_to, NULL);
+        timeline_add(&snac, xs_dict_get(msg, "id"), msg);
 
         return 0;
     }

+ 1 - 1
snac.h

@@ -91,7 +91,7 @@ double timeline_mtime(snac *snac);
 int timeline_del(snac *snac, char *id);
 d_char *timeline_simple_list(snac *snac, const char *idx_name, int skip, int show);
 d_char *timeline_list(snac *snac, const char *idx_name, int skip, int show);
-int timeline_add(snac *snac, char *id, char *o_msg, char *parent, char *referrer);
+int timeline_add(snac *snac, char *id, char *o_msg);
 void timeline_admire(snac *snac, char *o_msg, char *id, char *admirer, int like);
 
 d_char *timeline_top_level(d_char *list);