diff options
| -rw-r--r-- | html.c | 10 |
1 files changed, 7 insertions, 3 deletions
| @@ -113,9 +113,13 @@ xs_html *html_actor_icon(snac *user, xs_dict *actor, const char *date, | |||
| 113 | xs *name = actor_name(actor); | 113 | xs *name = actor_name(actor); |
| 114 | 114 | ||
| 115 | /* get the avatar */ | 115 | /* get the avatar */ |
| 116 | if ((v = xs_dict_get(actor, "icon")) != NULL && | 116 | if ((v = xs_dict_get(actor, "icon")) != NULL) { |
| 117 | (v = xs_dict_get(v, "url")) != NULL) { | 117 | /* if it's a list (Peertube), get the first one */ |
| 118 | avatar = xs_dup(v); | 118 | if (xs_type(v) == XSTYPE_LIST) |
| 119 | v = xs_list_get(v, 0); | ||
| 120 | |||
| 121 | if ((v = xs_dict_get(v, "url")) != NULL) | ||
| 122 | avatar = xs_dup(v); | ||
| 119 | } | 123 | } |
| 120 | 124 | ||
| 121 | if (avatar == NULL) | 125 | if (avatar == NULL) |