summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorGravatar default2023-08-14 13:12:16 +0200
committerGravatar default2023-08-14 13:12:16 +0200
commitf09340c352c36eceb8befd2466820a6e60aeb9ba (patch)
treecc6342507030c614fa92d38ca1b2a2962fd3c38e /activitypub.c
parentUpdated documentation. (diff)
downloadsnac2-f09340c352c36eceb8befd2466820a6e60aeb9ba.tar.gz
snac2-f09340c352c36eceb8befd2466820a6e60aeb9ba.tar.xz
snac2-f09340c352c36eceb8befd2466820a6e60aeb9ba.zip
If a user 'header' field is defined, use it.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c
index a834fad..c7de818 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -955,6 +955,16 @@ xs_dict *msg_actor(snac *snac)
955 if (xs_type(xs_dict_get(snac->config, "bot")) == XSTYPE_TRUE) 955 if (xs_type(xs_dict_get(snac->config, "bot")) == XSTYPE_TRUE)
956 msg = xs_dict_set(msg, "type", "Service"); 956 msg = xs_dict_set(msg, "type", "Service");
957 957
958 /* add the header image, if there is one defined */
959 const char *header = xs_dict_get(snac->config, "header");
960 if (!xs_is_null(header)) {
961 xs *d = xs_dict_new();
962 d = xs_dict_append(d, "type", "Image");
963 d = xs_dict_append(d, "mediaType", xs_mime_by_ext(header));
964 d = xs_dict_append(d, "url", header);
965 msg = xs_dict_set(msg, "image", d);
966 }
967
958 return msg; 968 return msg;
959} 969}
960 970