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
}
}
}
-
-#if 0
- if (!xs_is_null((p = xs_dict_get(meta, "parent"))) && *p) {
- /* this may happen if any of the autor or the parent aren't here */
- xs *s1 = xs_fmt(
- "
\n",
- L("in reply to"), p
- );
-
- s = xs_str_cat(s, s1);
- }
else
- if (!xs_is_null((p = xs_dict_get(meta, "liked_by"))) &&
- xs_list_in(p, snac->actor) != -1) {
- /* we liked this */
- xs *s1 = xs_fmt(
- "",
- snac->actor, xs_dict_get(snac->config, "name"), L("liked")
- );
+ if (strcmp(type, "Note") == 0) {
+ /* is the parent not here? */
+ char *parent = xs_dict_get(msg, "inReplyTo");
- s = xs_str_cat(s, s1);
+ if (!xs_is_null(parent) && !object_here(parent)) {
+ xs *s1 = xs_fmt(
+ "\n",
+ L("in reply to"), parent
+ );
+
+ s = xs_str_cat(s, s1);
+ }
}
-#endif
}
else
s = xs_str_cat(s, "\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);
d_char *index_list(const char *fn, int max);
d_char *index_list_desc(const char *fn, int max);
+int object_here_by_md5(char *id);
int object_here(char *id);
int object_get_by_md5(const char *md5, d_char **obj, const char *type);
int object_get(const char *id, d_char **obj, const char *type);
@@ -69,6 +70,7 @@ int object_del_if_unref(const char *id);
d_char *object_children(const char *id);
d_char *object_likes(const char *id);
d_char *object_announces(const char *id);
+int object_parent(const char *id, char *buf, int size);
int follower_add(snac *snac, const char *actor);
int follower_del(snac *snac, const char *actor);