diff options
| author | 2026-01-12 05:11:45 +0100 | |
|---|---|---|
| committer | 2026-01-12 05:11:45 +0100 | |
| commit | b1612de2102d9c30bf42402f38ffdc52ab482674 (patch) | |
| tree | 6c4cdf0523ca574063f7fb09f911f7c72dc3395c | |
| parent | Use the metadata pronouns. (diff) | |
| download | snac2-b1612de2102d9c30bf42402f38ffdc52ab482674.tar.gz snac2-b1612de2102d9c30bf42402f38ffdc52ab482674.tar.xz snac2-b1612de2102d9c30bf42402f38ffdc52ab482674.zip | |
Minor tweak.
| -rw-r--r-- | html.c | 10 |
1 files changed, 6 insertions, 4 deletions
| @@ -168,14 +168,16 @@ xs_str *actor_pronouns(xs_dict *actor) | |||
| 168 | const xs_list *attachment; | 168 | const xs_list *attachment; |
| 169 | const xs_dict *d; | 169 | const xs_dict *d; |
| 170 | const char *pronouns = ""; | 170 | const char *pronouns = ""; |
| 171 | char *ret; | 171 | xs_str *ret; |
| 172 | 172 | ||
| 173 | if (!xs_is_null((attachment = xs_dict_get(actor, "attachment")))) { | 173 | if (xs_is_list((attachment = xs_dict_get(actor, "attachment")))) { |
| 174 | xs_list_foreach(attachment, d) { | 174 | xs_list_foreach(attachment, d) { |
| 175 | char *prop = xs_utf8_to_lower(xs_dict_get(d, "name")); | 175 | xs *prop = xs_utf8_to_lower(xs_dict_get(d, "name")); |
| 176 | /* make sure that we are reading the correct metadata */ | 176 | /* make sure that we are reading the correct metadata */ |
| 177 | if (strlen(prop) == 8 && strcmp(prop, "pronouns") == 0) | 177 | if (strlen(prop) == 8 && strcmp(prop, "pronouns") == 0) { |
| 178 | pronouns = xs_dict_get(d, "value"); | 178 | pronouns = xs_dict_get(d, "value"); |
| 179 | break; | ||
| 180 | } | ||
| 179 | } | 181 | } |
| 180 | } | 182 | } |
| 181 | 183 | ||