summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/html.c b/html.c
index e482b53..bcafba4 100644
--- a/html.c
+++ b/html.c
@@ -2394,6 +2394,22 @@ 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, "quoteUri");
2400 if (xs_is_string(quoted_id) && xs_match(quoted_id, "https://*|http://*")) { /** **/
2401 xs *quoted_post = NULL;
2402
2403 if (valid_status(object_get(quoted_id, &quoted_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 if (user)
2411 enqueue_object_request(user, quoted_id, 0);
2412 }
2397 } 2413 }
2398 2414
2399 if (strcmp(type, "Question") == 0) { /** question content **/ 2415 if (strcmp(type, "Question") == 0) { /** question content **/
@@ -3221,7 +3237,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
3221 continue; 3237 continue;
3222 } 3238 }
3223 /* hide non-public posts viewed from outside */ 3239 /* hide non-public posts viewed from outside */
3224 if (read_only && scope != SCOPE_PUBLIC){ 3240 if (read_only && (scope != SCOPE_PUBLIC && scope != SCOPE_UNLISTED)) {
3225 continue; 3241 continue;
3226 } 3242 }
3227 3243