diff options
| author | 2024-01-24 19:30:01 +0100 | |
|---|---|---|
| committer | 2024-01-24 19:30:01 +0100 | |
| commit | 5b3a2fbd88aad1cf6f108a8a4943c9f106d04deb (patch) | |
| tree | 78927892b931901aeaab4782bcf54210df427b24 /activitypub.c | |
| parent | New function get_attachments() (still unused). (diff) | |
| download | snac2-5b3a2fbd88aad1cf6f108a8a4943c9f106d04deb.tar.gz snac2-5b3a2fbd88aad1cf6f108a8a4943c9f106d04deb.tar.xz snac2-5b3a2fbd88aad1cf6f108a8a4943c9f106d04deb.zip | |
Use get_attachments() in html_entry().
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c index 79b8350..e680e33 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -191,7 +191,7 @@ xs_list *get_attachments(const xs_dict *msg) | |||
| 191 | xs_list *p; | 191 | xs_list *p; |
| 192 | 192 | ||
| 193 | /* try first the attachments list */ | 193 | /* try first the attachments list */ |
| 194 | if (!xs_is_null(p = xs_dict_get(msg, "attachments"))) { | 194 | if (!xs_is_null(p = xs_dict_get(msg, "attachment"))) { |
| 195 | xs *attach = NULL; | 195 | xs *attach = NULL; |
| 196 | xs_val *v; | 196 | xs_val *v; |
| 197 | 197 | ||
| @@ -262,7 +262,7 @@ xs_list *get_attachments(const xs_dict *msg) | |||
| 262 | if (xs_type(v) == XSTYPE_DICT) { | 262 | if (xs_type(v) == XSTYPE_DICT) { |
| 263 | char *mtype = xs_dict_get(v, "type"); | 263 | char *mtype = xs_dict_get(v, "type"); |
| 264 | 264 | ||
| 265 | if (xs_type(type) == XSTYPE_STRING && strcmp(type, "Link") == 0) { | 265 | if (xs_type(mtype) == XSTYPE_STRING && strcmp(mtype, "Link") == 0) { |
| 266 | mtype = xs_dict_get(v, "mediaType"); | 266 | mtype = xs_dict_get(v, "mediaType"); |
| 267 | xs_list *tag = xs_dict_get(v, "tag"); | 267 | xs_list *tag = xs_dict_get(v, "tag"); |
| 268 | 268 | ||