diff options
| author | 2024-11-07 20:04:02 +0100 | |
|---|---|---|
| committer | 2024-11-07 20:04:02 +0100 | |
| commit | eb6d3d0d0eeb18f470a00d245ba913f8d705abe0 (patch) | |
| tree | 22c144d376ec8f3efe338a0aa9afa4cc433bef25 /activitypub.c | |
| parent | Propagate 'last-modified' and 'etag' fields while proxying. (diff) | |
| download | snac2-eb6d3d0d0eeb18f470a00d245ba913f8d705abe0.tar.gz snac2-eb6d3d0d0eeb18f470a00d245ba913f8d705abe0.tar.xz snac2-eb6d3d0d0eeb18f470a00d245ba913f8d705abe0.zip | |
Omit the 'image' field if there are any attachment.
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
| 202 | else | 202 | else |
| 203 | attach = xs_dup(p); | 203 | attach = xs_dup(p); |
| 204 | 204 | ||
| 205 | if (xs_type(attach) == XSTYPE_LIST) { | 205 | if (xs_type(attach) == XSTYPE_LIST && xs_list_len(attach) == 0) { |
| 206 | /* does the message have an image? */ | 206 | /* does the message have an image? */ |
| 207 | const xs_dict *d = xs_dict_get(msg, "image"); | 207 | const xs_dict *d = xs_dict_get(msg, "image"); |
| 208 | if (xs_type(d) == XSTYPE_DICT) { | 208 | if (xs_type(d) == XSTYPE_DICT) { |