commit b1612de
grunfink
·
2026-01-12 04:11:45 +0000 UTC
parent f5ad346
Minor tweak.
1 files changed,
+6,
-4
M
html.c
M
html.c
+6,
-4
1@@ -168,14 +168,16 @@ xs_str *actor_pronouns(xs_dict *actor)
2 const xs_list *attachment;
3 const xs_dict *d;
4 const char *pronouns = "";
5- char *ret;
6+ xs_str *ret;
7
8- if (!xs_is_null((attachment = xs_dict_get(actor, "attachment")))) {
9+ if (xs_is_list((attachment = xs_dict_get(actor, "attachment")))) {
10 xs_list_foreach(attachment, d) {
11- char *prop = xs_utf8_to_lower(xs_dict_get(d, "name"));
12+ xs *prop = xs_utf8_to_lower(xs_dict_get(d, "name"));
13 /* make sure that we are reading the correct metadata */
14- if (strlen(prop) == 8 && strcmp(prop, "pronouns") == 0)
15+ if (strlen(prop) == 8 && strcmp(prop, "pronouns") == 0) {
16 pronouns = xs_dict_get(d, "value");
17+ break;
18+ }
19 }
20 }
21