summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-07-25 12:36:04 +0200
committerdefault <nobody@localhost>2023-07-25 12:36:04 +0200
commitede2a38b2bb98b34ac44dcd6ed8710a25fe09990 (patch)
tree9037ea8e22839849d79798f57549ba0e2acddfcc /html.c
parent085c5a545aa9b7112deabe9dc51e1f99906b7cab (diff)
If an image has no description, try the post 'name' field.
Diffstat (limited to 'html.c')
-rw-r--r--html.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/html.c b/html.c
index 4f7f982..976a244 100644
--- a/html.c
+++ b/html.c
@@ -1194,6 +1194,8 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
const char *name = xs_dict_get(v, "name");
if (xs_is_null(name))
+ name = xs_dict_get(msg, "name");
+ if (xs_is_null(name))
name = L("No description");
xs *es1 = encode_html(name);