summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-01-24 19:30:01 +0100
committerdefault <nobody@localhost>2024-01-24 19:30:01 +0100
commit5b3a2fbd88aad1cf6f108a8a4943c9f106d04deb (patch)
tree78927892b931901aeaab4782bcf54210df427b24 /activitypub.c
parent08898af45c3ec5f212af873998c7f7c61091031f (diff)
Use get_attachments() in html_entry().
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c4
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)
xs_list *p;
/* try first the attachments list */
- if (!xs_is_null(p = xs_dict_get(msg, "attachments"))) {
+ if (!xs_is_null(p = xs_dict_get(msg, "attachment"))) {
xs *attach = NULL;
xs_val *v;
@@ -262,7 +262,7 @@ xs_list *get_attachments(const xs_dict *msg)
if (xs_type(v) == XSTYPE_DICT) {
char *mtype = xs_dict_get(v, "type");
- if (xs_type(type) == XSTYPE_STRING && strcmp(type, "Link") == 0) {
+ if (xs_type(mtype) == XSTYPE_STRING && strcmp(mtype, "Link") == 0) {
mtype = xs_dict_get(v, "mediaType");
xs_list *tag = xs_dict_get(v, "tag");