summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/html.c b/html.c
index 454c8be..18038ff 100644
--- a/html.c
+++ b/html.c
@@ -1695,7 +1695,7 @@ xs_html *html_top_controls(snac *user)
1695 xs_html_text(L("Languages you usually post in:")), 1695 xs_html_text(L("Languages you usually post in:")),
1696 xs_html_sctag("br", NULL), 1696 xs_html_sctag("br", NULL),
1697 xs_html_sctag("input", 1697 xs_html_sctag("input",
1698 xs_html_attr("type", "next"), 1698 xs_html_attr("type", "text"),
1699 xs_html_attr("name", "post_langs"), 1699 xs_html_attr("name", "post_langs"),
1700 xs_html_attr("value", post_langs), 1700 xs_html_attr("value", post_langs),
1701 xs_html_attr("placeholder", L("en fr es de_AT")))), 1701 xs_html_attr("placeholder", L("en fr es de_AT")))),
@@ -2394,6 +2394,23 @@ 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_or(xs_dict_get(msg, "quoteUri"), xs_dict_get(msg, "quoteUrl"));
2400
2401 if (xs_is_string(quoted_id) && xs_match(quoted_id, "https://*|http://*")) { /** **/
2402 xs *quoted_post = NULL;
2403
2404 if (valid_status(object_get(quoted_id, &quoted_post))) {
2405 xs_html_add(snac_content,
2406 xs_html_tag("blockquote",
2407 xs_html_attr("class", "snac-quoted-post"),
2408 html_entry(user, quoted_post, 1, 1, NULL, 1)));
2409 }
2410 else
2411 if (user)
2412 enqueue_object_request(user, quoted_id, 0);
2413 }
2397 } 2414 }
2398 2415
2399 if (strcmp(type, "Question") == 0) { /** question content **/ 2416 if (strcmp(type, "Question") == 0) { /** question content **/
@@ -3221,7 +3238,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
3221 continue; 3238 continue;
3222 } 3239 }
3223 /* hide non-public posts viewed from outside */ 3240 /* hide non-public posts viewed from outside */
3224 if (read_only && scope != SCOPE_PUBLIC){ 3241 if (read_only && (scope != SCOPE_PUBLIC && scope != SCOPE_UNLISTED)) {
3225 continue; 3242 continue;
3226 } 3243 }
3227 3244
@@ -3650,9 +3667,13 @@ xs_str *html_notifications(snac *user, int skip, int show)
3650 3667
3651 if (valid_status(actor_get(actor_id, &actor))) 3668 if (valid_status(actor_get(actor_id, &actor)))
3652 a_name = actor_name(actor, proxy); 3669 a_name = actor_name(actor, proxy);
3653 else 3670 else {
3654 a_name = xs_dup(actor_id); 3671 a_name = xs_dup(actor_id);
3655 3672
3673 /* actor not here: request it */
3674 enqueue_actor_refresh(user, actor_id, 0);
3675 }
3676
3656 xs *label_sanitized = sanitize(type); 3677 xs *label_sanitized = sanitize(type);
3657 const char *label = label_sanitized; 3678 const char *label = label_sanitized;
3658 3679