diff options
| author | 2025-11-09 09:28:34 +0100 | |
|---|---|---|
| committer | 2025-11-09 09:28:34 +0100 | |
| commit | 0d32db45926bc4526e052846dfc3d81249955dec (patch) | |
| tree | 387646420baeed74fd7d6061b9a568123008f5a1 /html.c | |
| parent | Merge pull request 'po/de_DE.po aktualisiert' (#494) from zen/snac2:master in... (diff) | |
| download | snac2-0d32db45926bc4526e052846dfc3d81249955dec.tar.gz snac2-0d32db45926bc4526e052846dfc3d81249955dec.tar.xz snac2-0d32db45926bc4526e052846dfc3d81249955dec.zip | |
Show quoted posts.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 15 |
1 files changed, 15 insertions, 0 deletions
| @@ -2394,6 +2394,21 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 2394 | /* c contains sanitized HTML */ | 2394 | /* c contains sanitized HTML */ |
| 2395 | xs_html_add(snac_content, | 2395 | xs_html_add(snac_content, |
| 2396 | xs_html_raw(c)); | 2396 | xs_html_raw(c)); |
| 2397 | |||
| 2398 | /* quoted post */ | ||
| 2399 | const char *quoted_id = xs_dict_get(msg, "quote"); | ||
| 2400 | if (xs_is_string(quoted_id)) { | ||
| 2401 | xs *quoted_post = NULL; | ||
| 2402 | |||
| 2403 | if (valid_status(object_get(quoted_id, "ed_post))) { | ||
| 2404 | xs_html_add(snac_content, | ||
| 2405 | xs_html_tag("blockquote", | ||
| 2406 | xs_html_attr("class", "snac-quoted-post"), | ||
| 2407 | html_entry(user, quoted_post, 1, 1, NULL, 1))); | ||
| 2408 | } | ||
| 2409 | else | ||
| 2410 | enqueue_object_request(user, quoted_id, 0); | ||
| 2411 | } | ||
| 2397 | } | 2412 | } |
| 2398 | 2413 | ||
| 2399 | if (strcmp(type, "Question") == 0) { /** question content **/ | 2414 | if (strcmp(type, "Question") == 0) { /** question content **/ |