Minor tweak.

This commit is contained in:
grunfink
2026-01-12 05:11:45 +01:00
parent f5ad346f7d
commit b1612de210
+6 -4
View File
@@ -168,14 +168,16 @@ xs_str *actor_pronouns(xs_dict *actor)
const xs_list *attachment;
const xs_dict *d;
const char *pronouns = "";
char *ret;
xs_str *ret;
if (!xs_is_null((attachment = xs_dict_get(actor, "attachment")))) {
if (xs_is_list((attachment = xs_dict_get(actor, "attachment")))) {
xs_list_foreach(attachment, d) {
char *prop = xs_utf8_to_lower(xs_dict_get(d, "name"));
xs *prop = xs_utf8_to_lower(xs_dict_get(d, "name"));
/* make sure that we are reading the correct metadata */
if (strlen(prop) == 8 && strcmp(prop, "pronouns") == 0)
if (strlen(prop) == 8 && strcmp(prop, "pronouns") == 0) {
pronouns = xs_dict_get(d, "value");
break;
}
}
}