mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
Deleted redundant code.
This commit is contained in:
parent
d1b2fcf426
commit
f3e7aff2d7
14
html.c
14
html.c
@ -545,10 +545,9 @@ xs_html *html_user_head(snac *user)
|
|||||||
|
|
||||||
if (avatar == NULL || *avatar == '\0') {
|
if (avatar == NULL || *avatar == '\0') {
|
||||||
xs_free(avatar);
|
xs_free(avatar);
|
||||||
avatar = xs_fmt("data:image/png;base64, %s", default_avatar_base64());
|
avatar = xs_fmt("%s/susie.png", srv_baseurl);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
xs *s_bio = xs_dup(xs_dict_get(user->config, "bio"));
|
xs *s_bio = xs_dup(xs_dict_get(user->config, "bio"));
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
@ -557,14 +556,6 @@ xs_html *html_user_head(snac *user)
|
|||||||
s_bio[n] != '\r' && s_bio[n] != '\n' && n < 128; n++);
|
s_bio[n] != '\r' && s_bio[n] != '\n' && n < 128; n++);
|
||||||
s_bio[n] = '\0';
|
s_bio[n] = '\0';
|
||||||
|
|
||||||
xs *s_avatar = xs_dup(avatar);
|
|
||||||
|
|
||||||
/* don't inline an empty avatar: create a real link */
|
|
||||||
if (xs_startswith(s_avatar, "data:")) {
|
|
||||||
xs_free(s_avatar);
|
|
||||||
s_avatar = xs_fmt("%s/susie.png", srv_baseurl);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* og properties */
|
/* og properties */
|
||||||
xs_html_add(head,
|
xs_html_add(head,
|
||||||
xs_html_sctag("meta",
|
xs_html_sctag("meta",
|
||||||
@ -578,14 +569,13 @@ xs_html *html_user_head(snac *user)
|
|||||||
xs_html_attr("content", s_bio)),
|
xs_html_attr("content", s_bio)),
|
||||||
xs_html_sctag("meta",
|
xs_html_sctag("meta",
|
||||||
xs_html_attr("property", "og:image"),
|
xs_html_attr("property", "og:image"),
|
||||||
xs_html_attr("content", s_avatar)),
|
xs_html_attr("content", avatar)),
|
||||||
xs_html_sctag("meta",
|
xs_html_sctag("meta",
|
||||||
xs_html_attr("property", "og:width"),
|
xs_html_attr("property", "og:width"),
|
||||||
xs_html_attr("content", "300")),
|
xs_html_attr("content", "300")),
|
||||||
xs_html_sctag("meta",
|
xs_html_sctag("meta",
|
||||||
xs_html_attr("property", "og:height"),
|
xs_html_attr("property", "og:height"),
|
||||||
xs_html_attr("content", "300")));
|
xs_html_attr("content", "300")));
|
||||||
}
|
|
||||||
|
|
||||||
/* RSS link */
|
/* RSS link */
|
||||||
xs *rss_url = xs_fmt("%s.rss", user->actor);
|
xs *rss_url = xs_fmt("%s.rss", user->actor);
|
||||||
|
Loading…
Reference in New Issue
Block a user