diff options
| author | shtrophic <shtrophic@noreply.codeberg.org> | 2024-11-20 18:13:44 +0000 |
|---|---|---|
| committer | shtrophic <shtrophic@noreply.codeberg.org> | 2024-11-20 18:13:44 +0000 |
| commit | 4867587032de0237aeff850ddedb1733c1f16073 (patch) | |
| tree | a6da07b5cf657a3c93d5276fdfd041a9e0fbe403 /mastoapi.c | |
| parent | 80ff16b21c7081165d346ff94b450f432a82ee47 (diff) | |
| parent | c507e30607812c4c2ab2dd27835eb5f2ea6a9742 (diff) | |
Merge branch 'master' into master
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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); { |