aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2025-11-09 09:28:34 +0100
committergrunfink <grunfink@comam.es>2025-11-09 09:28:34 +0100
commit0d32db45926bc4526e052846dfc3d81249955dec (patch)
tree387646420baeed74fd7d6061b9a568123008f5a1
parent074072bde45284a2f11bb8a06b5670dbd3c4a716 (diff)
Show quoted posts.
-rw-r--r--html.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/html.c b/html.c
index 2146c93..23724b2 100644
--- a/html.c
+++ b/html.c
@@ -2394,6 +2394,21 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
/* c contains sanitized HTML */
xs_html_add(snac_content,
xs_html_raw(c));
+
+ /* quoted post */
+ const char *quoted_id = xs_dict_get(msg, "quote");
+ if (xs_is_string(quoted_id)) {
+ xs *quoted_post = NULL;
+
+ if (valid_status(object_get(quoted_id, &quoted_post))) {
+ xs_html_add(snac_content,
+ xs_html_tag("blockquote",
+ xs_html_attr("class", "snac-quoted-post"),
+ html_entry(user, quoted_post, 1, 1, NULL, 1)));
+ }
+ else
+ enqueue_object_request(user, quoted_id, 0);
+ }
}
if (strcmp(type, "Question") == 0) { /** question content **/