From eb6d3d0d0eeb18f470a00d245ba913f8d705abe0 Mon Sep 17 00:00:00 2001 From: default Date: Thu, 7 Nov 2024 20:04:02 +0100 Subject: Omit the 'image' field if there are any attachment. --- activitypub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activitypub.c') diff --git a/activitypub.c b/activitypub.c index 96c3038..0b2fc6a 100644 --- a/activitypub.c +++ b/activitypub.c @@ -202,7 +202,7 @@ xs_list *get_attachments(const xs_dict *msg) else attach = xs_dup(p); - if (xs_type(attach) == XSTYPE_LIST) { + if (xs_type(attach) == XSTYPE_LIST && xs_list_len(attach) == 0) { /* does the message have an image? */ const xs_dict *d = xs_dict_get(msg, "image"); if (xs_type(d) == XSTYPE_DICT) { -- cgit v1.2.3