aboutsummaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorshtrophic <shtrophic@noreply.codeberg.org>2024-11-20 18:13:44 +0000
committershtrophic <shtrophic@noreply.codeberg.org>2024-11-20 18:13:44 +0000
commit4867587032de0237aeff850ddedb1733c1f16073 (patch)
treea6da07b5cf657a3c93d5276fdfd041a9e0fbe403 /mastoapi.c
parent80ff16b21c7081165d346ff94b450f432a82ee47 (diff)
parentc507e30607812c4c2ab2dd27835eb5f2ea6a9742 (diff)
Merge branch 'master' into master
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 1dd91dc..a529990 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -827,7 +827,16 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
st = xs_dict_append(st, "url", id);
st = xs_dict_append(st, "account", acct);
- xs *fd = mastoapi_date(xs_dict_get(msg, "published"));
+ const char *published = xs_dict_get(msg, "published");
+ xs *fd = NULL;
+
+ if (published)
+ fd = mastoapi_date(published);
+ else {
+ xs *p = xs_str_iso_date(0);
+ fd = mastoapi_date(p);
+ }
+
st = xs_dict_append(st, "created_at", fd);
{