diff options
| author | 2026-02-14 16:47:22 +0100 | |
|---|---|---|
| committer | 2026-02-14 16:47:22 +0100 | |
| commit | 0cc14c3725fc2d97e09d160c5cb2e4f8485c67af (patch) | |
| tree | ef7b85908194719c6ec961e1accbeba8cca7bb5f | |
| parent | Fixed crash when the 'url' field is a list. (diff) | |
| download | snac2-0cc14c3725fc2d97e09d160c5cb2e4f8485c67af.tar.gz snac2-0cc14c3725fc2d97e09d160c5cb2e4f8485c67af.tar.xz snac2-0cc14c3725fc2d97e09d160c5cb2e4f8485c67af.zip | |
| -rw-r--r-- | html.c | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -4260,6 +4260,12 @@ xs_str *html_notifications(snac *user, int skip, int show) | |||
| 4260 | 4260 | ||
| 4261 | const char *html_url = xs_dict_get_def(actor, "url", actor_id); | 4261 | const char *html_url = xs_dict_get_def(actor, "url", actor_id); |
| 4262 | 4262 | ||
| 4263 | if (xs_is_list(html_url)) | ||
| 4264 | html_url = xs_list_get(html_url, 0); | ||
| 4265 | |||
| 4266 | if (!xs_is_string(html_url)) | ||
| 4267 | html_url = actor_id; | ||
| 4268 | |||
| 4263 | xs *label_sanitized = sanitize(type); | 4269 | xs *label_sanitized = sanitize(type); |
| 4264 | const char *label = label_sanitized; | 4270 | const char *label = label_sanitized; |
| 4265 | 4271 | ||