From 5b3a2fbd88aad1cf6f108a8a4943c9f106d04deb Mon Sep 17 00:00:00 2001 From: default Date: Wed, 24 Jan 2024 19:30:01 +0100 Subject: Use get_attachments() in html_entry(). --- activitypub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activitypub.c') 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"); -- cgit v1.2.3