aboutsummaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2025-03-02 06:04:52 +0100
committerdefault <nobody@localhost>2025-03-02 06:04:52 +0100
commit8bd364bd49116b8b335272300ca05f25e1267df7 (patch)
tree662125524613d1d1309edc990fe143b19e510a49 /mastoapi.c
parent1434dc277abeb75a2414042a474203a61b73d262 (diff)
msg_note() accepts a nullable post date.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 797a4da..25b17e2 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -2628,6 +2628,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
const char *summary = xs_dict_get(args, "spoiler_text");
const char *media_ids = xs_dict_get(args, "media_ids");
const char *language = xs_dict_get(args, "language");
+ const char *sched_date = xs_dict_get(args, "scheduled_at");
if (xs_is_null(media_ids))
media_ids = xs_dict_get(args, "media_ids[]");
@@ -2684,7 +2685,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
if (strcmp(visibility, "public") == 0)
scope = 0;
- xs *msg = msg_note(&snac, content, NULL, irt, attach_list, scope, language);
+ xs *msg = msg_note(&snac, content, NULL, irt, attach_list, scope, language, sched_date);
if (!xs_is_null(summary) && *summary) {
msg = xs_dict_set(msg, "sensitive", xs_stock(XSTYPE_TRUE));
@@ -3034,7 +3035,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
if (o) {
const char *name = xs_dict_get(o, "name");
- xs *msg = msg_note(&snac, "", atto, (char *)id, NULL, 1, NULL);
+ xs *msg = msg_note(&snac, "", atto, (char *)id, NULL, 1, NULL, NULL);
msg = xs_dict_append(msg, "name", name);
xs *c_msg = msg_create(&snac, msg);