summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--activitypub.c2
-rw-r--r--data.c5
-rw-r--r--snac.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/activitypub.c b/activitypub.c
index e2519e6..a91821d 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1025,7 +1025,7 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor,
1025 "\n", 1025 "\n",
1026 from, email, subject); 1026 from, email, subject);
1027 1027
1028 xs *mailinfo = xs_dict_new(); 1028 xs_dict *mailinfo = xs_dict_new();
1029 xs_dict_append(mailinfo, "from", from); 1029 xs_dict_append(mailinfo, "from", from);
1030 xs_dict_append(mailinfo, "to", email); 1030 xs_dict_append(mailinfo, "to", email);
1031 xs_dict_append(mailinfo, "body", xs_fmt("%s%s", header, body)); 1031 xs_dict_append(mailinfo, "body", xs_fmt("%s%s", header, body));
diff --git a/data.c b/data.c
index ae85aaf..d25a5d7 100644
--- a/data.c
+++ b/data.c
@@ -3174,7 +3174,7 @@ static xs_dict *_enqueue_put(const char *fn, xs_dict *msg)
3174} 3174}
3175 3175
3176 3176
3177static xs_dict *_new_qmsg(const char *type, const xs_val *msg, int retries) 3177static xs_dict *_new_qmsg(const char *type, xs_dict *msg, int retries)
3178/* creates a queue message */ 3178/* creates a queue message */
3179{ 3179{
3180 int qrt = xs_number_get(xs_dict_get(srv_config, "queue_retry_minutes")); 3180 int qrt = xs_number_get(xs_dict_get(srv_config, "queue_retry_minutes"));
@@ -3276,9 +3276,10 @@ void enqueue_output_by_actor(snac *snac, const xs_dict *msg,
3276} 3276}
3277 3277
3278 3278
3279void enqueue_email(const xs_dict *msg, int retries) 3279void enqueue_email(xs_dict *msg, int retries)
3280/* enqueues an email message to be sent */ 3280/* enqueues an email message to be sent */
3281{ 3281{
3282 /* qmsg owns msg */
3282 xs *qmsg = _new_qmsg("email", msg, retries); 3283 xs *qmsg = _new_qmsg("email", msg, retries);
3283 const char *ntid = xs_dict_get(qmsg, "ntid"); 3284 const char *ntid = xs_dict_get(qmsg, "ntid");
3284 xs *fn = xs_fmt("%s/queue/%s.json", srv_basedir, ntid); 3285 xs *fn = xs_fmt("%s/queue/%s.json", srv_basedir, ntid);
diff --git a/snac.h b/snac.h
index 92ffb3f..545df74 100644
--- a/snac.h
+++ b/snac.h
@@ -274,7 +274,7 @@ void enqueue_output(snac *snac, const xs_dict *msg,
274 const xs_str *inbox, int retries, int p_status); 274 const xs_str *inbox, int retries, int p_status);
275void enqueue_output_by_actor(snac *snac, const xs_dict *msg, 275void enqueue_output_by_actor(snac *snac, const xs_dict *msg,
276 const xs_str *actor, int retries); 276 const xs_str *actor, int retries);
277void enqueue_email(const xs_str *msg, int retries); 277void enqueue_email(xs_dict *msg, int retries);
278void enqueue_telegram(const xs_str *msg, const char *bot, const char *chat_id); 278void enqueue_telegram(const xs_str *msg, const char *bot, const char *chat_id);
279void enqueue_ntfy(const xs_str *msg, const char *ntfy_server, const char *ntfy_token); 279void enqueue_ntfy(const xs_str *msg, const char *ntfy_server, const char *ntfy_token);
280void enqueue_message(snac *snac, const xs_dict *msg); 280void enqueue_message(snac *snac, const xs_dict *msg);