summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--html.c34
-rw-r--r--snac.h2
2 files changed, 14 insertions, 22 deletions
diff --git a/html.c b/html.c
index 43f064f..65ea5e1 100644
--- a/html.c
+++ b/html.c
@@ -591,31 +591,21 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, int
591 } 591 }
592 } 592 }
593 } 593 }
594
595#if 0
596 if (!xs_is_null((p = xs_dict_get(meta, "parent"))) && *p) {
597 /* this may happen if any of the autor or the parent aren't here */
598 xs *s1 = xs_fmt(
599 "<div class=\"snac-origin\">%s "
600 "<a href=\"%s\">»</a></div>\n",
601 L("in reply to"), p
602 );
603
604 s = xs_str_cat(s, s1);
605 }
606 else 594 else
607 if (!xs_is_null((p = xs_dict_get(meta, "liked_by"))) && 595 if (strcmp(type, "Note") == 0) {
608 xs_list_in(p, snac->actor) != -1) { 596 /* is the parent not here? */
609 /* we liked this */ 597 char *parent = xs_dict_get(msg, "inReplyTo");
610 xs *s1 = xs_fmt(
611 "<div class=\"snac-origin\">"
612 "<a href=\"%s\">%s</a> %s</a></div>",
613 snac->actor, xs_dict_get(snac->config, "name"), L("liked")
614 );
615 598
616 s = xs_str_cat(s, s1); 599 if (!xs_is_null(parent) && !object_here(parent)) {
600 xs *s1 = xs_fmt(
601 "<div class=\"snac-origin\">%s "
602 "<a href=\"%s\">»</a></div>\n",
603 L("in reply to"), parent
604 );
605
606 s = xs_str_cat(s, s1);
607 }
617 } 608 }
618#endif
619 } 609 }
620 else 610 else
621 s = xs_str_cat(s, "<div class=\"snac-child\">\n"); 611 s = xs_str_cat(s, "<div class=\"snac-child\">\n");
diff --git a/snac.h b/snac.h
index 3d7d8fd..0d7ede1 100644
--- a/snac.h
+++ b/snac.h
@@ -60,6 +60,7 @@ int index_first(const char *fn, char *buf, int size);
60d_char *index_list(const char *fn, int max); 60d_char *index_list(const char *fn, int max);
61d_char *index_list_desc(const char *fn, int max); 61d_char *index_list_desc(const char *fn, int max);
62 62
63int object_here_by_md5(char *id);
63int object_here(char *id); 64int object_here(char *id);
64int object_get_by_md5(const char *md5, d_char **obj, const char *type); 65int object_get_by_md5(const char *md5, d_char **obj, const char *type);
65int object_get(const char *id, d_char **obj, const char *type); 66int object_get(const char *id, d_char **obj, const char *type);
@@ -69,6 +70,7 @@ int object_del_if_unref(const char *id);
69d_char *object_children(const char *id); 70d_char *object_children(const char *id);
70d_char *object_likes(const char *id); 71d_char *object_likes(const char *id);
71d_char *object_announces(const char *id); 72d_char *object_announces(const char *id);
73int object_parent(const char *id, char *buf, int size);
72 74
73int follower_add(snac *snac, const char *actor); 75int follower_add(snac *snac, const char *actor);
74int follower_del(snac *snac, const char *actor); 76int follower_del(snac *snac, const char *actor);