aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-11-07 20:04:02 +0100
committerdefault <nobody@localhost>2024-11-07 20:04:02 +0100
commiteb6d3d0d0eeb18f470a00d245ba913f8d705abe0 (patch)
tree22c144d376ec8f3efe338a0aa9afa4cc433bef25
parent0f8ade8c6050d61d1a9bf0522ac087eaf41eab14 (diff)
Omit the 'image' field if there are any attachment.
-rw-r--r--activitypub.c2
-rw-r--r--html.c4
2 files changed, 3 insertions, 3 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)
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) {
diff --git a/html.c b/html.c
index b5d9148..e329706 100644
--- a/html.c
+++ b/html.c
@@ -50,8 +50,6 @@ xs_str *make_url(const char *href, const char *proxy)
if (proxy) {
xs *p = xs_str_cat(xs_dup(proxy), "/proxy/");
url = xs_replace(href, "https:/" "/", p);
-
- srv_debug(1, xs_fmt("Proxying %s %s", href, url));
}
else
url = xs_dup(href);
@@ -3244,6 +3242,8 @@ int html_get_handler(const xs_dict *req, const char *q_path,
}
}
}
+
+ snac_debug(&snac, 1, xs_fmt("Proxy for %s %d", url, status));
}
}
else