summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/html.c b/html.c
index 3f59b09..63b54c3 100644
--- a/html.c
+++ b/html.c
@@ -196,14 +196,14 @@ d_char *html_user_header(snac *snac, d_char *s, int local)
"<a href=\"%s.rss\">%s</a> - "
"<a href=\"%s/admin\" rel=\"nofollow\">%s</a></nav>\n",
snac->actor, L("RSS"),
- snac->actor, L("admin"));
+ snac->actor, L("private"));
else
s1 = xs_fmt(
"<a href=\"%s\">%s</a> - "
"<a href=\"%s/admin\">%s</a> - "
"<a href=\"%s/people\">%s</a></nav>\n",
snac->actor, L("public"),
- snac->actor, L("admin"),
+ snac->actor, L("private"),
snac->actor, L("people"));
s = xs_str_cat(s, s1);
@@ -497,7 +497,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int local, i
xs *s = xs_str_new(NULL);
/* top wrap */
- if ((v = xs_dict_get(meta, "hidden")) && xs_type(v) == XSTYPE_TRUE)
+ if (is_hidden(snac, id))
s = xs_str_cat(s, "<div style=\"display: none\">\n");
else
s = xs_str_cat(s, "<div>\n");
@@ -840,13 +840,12 @@ d_char *html_people_list(snac *snac, d_char *os, d_char *list, const char *heade
{
xs *s = xs_str_new(NULL);
xs *h = xs_fmt("<h2>%s</h2>\n", header);
- char *p, *v;
+ char *p, *actor_id;
s = xs_str_cat(s, h);
p = list;
- while (xs_list_iter(&p, &v)) {
- char *actor_id = xs_dict_get(v, "actor");
+ while (xs_list_iter(&p, &actor_id)) {
xs *md5 = xs_md5_hex(actor_id, strlen(actor_id));
xs *actor = NULL;
@@ -1008,7 +1007,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
status = 200;
}
else {
- xs *list = local_list(&snac, 0xfffffff);
+ xs *list = local_list(&snac, XS_ALL);
*body = html_timeline(&snac, list, 1);
*b_size = strlen(*body);
@@ -1034,7 +1033,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
else {
snac_debug(&snac, 1, xs_fmt("building timeline"));
- xs *list = timeline_list(&snac, 0xfffffff);
+ xs *list = timeline_list(&snac, XS_ALL);
*body = html_timeline(&snac, list, 0);
*b_size = strlen(*body);
@@ -1300,7 +1299,7 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
}
else
if (strcmp(action, L("Hide")) == 0) {
- timeline_hide(&snac, id, 1);
+ hide(&snac, id);
}
else
if (strcmp(action, L("Follow")) == 0) {
@@ -1341,6 +1340,9 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
post(&snac, msg);
+ /* FIXME: also post this Tombstone to people
+ that Announce'd it */
+
snac_log(&snac, xs_fmt("posted tombstone for %s", id));
}