Deleted real unused parameters.

This commit is contained in:
default 2023-05-04 09:19:26 +02:00
parent cd19efcae2
commit 511f5062b7
4 changed files with 11 additions and 12 deletions

View file

@ -109,7 +109,7 @@ int actor_request(snac *snac, const char *actor, xs_dict **data)
if (valid_status(status2)) { if (valid_status(status2)) {
/* renew data */ /* renew data */
status = actor_add(snac, actor, payload); status = actor_add(actor, payload);
if (data != NULL) { if (data != NULL) {
*data = payload; *data = payload;
@ -1121,7 +1121,7 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
else else
if (strcmp(type, "Update") == 0) { if (strcmp(type, "Update") == 0) {
if (strcmp(utype, "Person") == 0) { if (strcmp(utype, "Person") == 0) {
actor_add(snac, actor, xs_dict_get(msg, "object")); actor_add(actor, xs_dict_get(msg, "object"));
snac_log(snac, xs_fmt("updated actor %s", actor)); snac_log(snac, xs_fmt("updated actor %s", actor));
} }

2
data.c
View file

@ -1349,7 +1349,7 @@ int is_hidden(snac *snac, const char *id)
} }
int actor_add(snac *snac, const char *actor, xs_dict *msg) int actor_add(const char *actor, xs_dict *msg)
/* adds an actor */ /* adds an actor */
{ {
return object_add_ow(actor, msg); return object_add_ow(actor, msg);

15
html.c
View file

@ -79,7 +79,7 @@ xs_str *actor_name(xs_dict *actor)
} }
d_char *html_actor_icon(snac *snac, d_char *os, char *actor, xs_str *html_actor_icon(xs_str *os, char *actor,
const char *date, const char *udate, const char *url, int priv) const char *date, const char *udate, const char *url, int priv)
{ {
xs *s = xs_str_new(NULL); xs *s = xs_str_new(NULL);
@ -168,7 +168,7 @@ d_char *html_msg_icon(snac *snac, d_char *os, char *msg)
date = xs_dict_get(msg, "published"); date = xs_dict_get(msg, "published");
udate = xs_dict_get(msg, "updated"); udate = xs_dict_get(msg, "updated");
os = html_actor_icon(snac, os, actor, date, udate, url, priv); os = html_actor_icon(os, actor, date, udate, url, priv);
} }
return os; return os;
@ -983,7 +983,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local,
} }
d_char *html_user_footer(snac *snac, d_char *s) xs_str *html_user_footer(xs_str *s)
{ {
xs *s1 = xs_fmt( xs *s1 = xs_fmt(
"<div class=\"snac-footer\">\n" "<div class=\"snac-footer\">\n"
@ -1064,7 +1064,7 @@ d_char *html_timeline(snac *snac, char *list, int local, int skip, int show, int
s = xs_str_cat(s, s1); s = xs_str_cat(s, s1);
} }
s = html_user_footer(snac, s); s = html_user_footer(s);
s = xs_str_cat(s, "</body>\n</html>\n"); s = xs_str_cat(s, "</body>\n</html>\n");
@ -1088,8 +1088,7 @@ d_char *html_people_list(snac *snac, d_char *os, d_char *list, const char *heade
if (valid_status(actor_get(snac, actor_id, &actor))) { if (valid_status(actor_get(snac, actor_id, &actor))) {
s = xs_str_cat(s, "<div class=\"snac-post\">\n"); s = xs_str_cat(s, "<div class=\"snac-post\">\n");
s = html_actor_icon(snac, s, actor, xs_dict_get(actor, "published"), NULL, NULL, 0); s = html_actor_icon(s, actor, xs_dict_get(actor, "published"), NULL, NULL, 0);
/* content (user bio) */ /* content (user bio) */
char *c = xs_dict_get(actor, "summary"); char *c = xs_dict_get(actor, "summary");
@ -1182,7 +1181,7 @@ d_char *html_people(snac *snac)
s = html_people_list(snac, s, wers, L("People that follows you"), "e"); s = html_people_list(snac, s, wers, L("People that follows you"), "e");
s = html_user_footer(snac, s); s = html_user_footer(s);
s = xs_str_cat(s, "</body>\n</html>\n"); s = xs_str_cat(s, "</body>\n</html>\n");
@ -1277,7 +1276,7 @@ xs_str *html_notifications(snac *snac)
s = xs_str_cat(s, s1); s = xs_str_cat(s, s1);
} }
s = html_user_footer(snac, s); s = html_user_footer(s);
s = xs_str_cat(s, "</body>\n</html>\n"); s = xs_str_cat(s, "</body>\n</html>\n");

2
snac.h
View file

@ -128,7 +128,7 @@ int is_muted(snac *snac, const char *actor);
void hide(snac *snac, const char *id); void hide(snac *snac, const char *id);
int is_hidden(snac *snac, const char *id); int is_hidden(snac *snac, const char *id);
int actor_add(snac *snac, const char *actor, xs_dict *msg); int actor_add(const char *actor, xs_dict *msg);
int actor_get(snac *snac, const char *actor, xs_dict **data); int actor_get(snac *snac, const char *actor, xs_dict **data);
int static_get(snac *snac, const char *id, d_char **data, int *size); int static_get(snac *snac, const char *id, d_char **data, int *size);