diff options
| author | 2024-11-20 18:13:44 +0000 | |
|---|---|---|
| committer | 2024-11-20 18:13:44 +0000 | |
| commit | 4867587032de0237aeff850ddedb1733c1f16073 (patch) | |
| tree | a6da07b5cf657a3c93d5276fdfd041a9e0fbe403 /mastoapi.c | |
| parent | make sendmail executable if configured (diff) | |
| parent | New function xs_unicode_right_to_left(). (diff) | |
| download | snac2-4867587032de0237aeff850ddedb1733c1f16073.tar.gz snac2-4867587032de0237aeff850ddedb1733c1f16073.tar.xz snac2-4867587032de0237aeff850ddedb1733c1f16073.zip | |
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) | |||
| 827 | st = xs_dict_append(st, "url", id); | 827 | st = xs_dict_append(st, "url", id); |
| 828 | st = xs_dict_append(st, "account", acct); | 828 | st = xs_dict_append(st, "account", acct); |
| 829 | 829 | ||
| 830 | xs *fd = mastoapi_date(xs_dict_get(msg, "published")); | 830 | const char *published = xs_dict_get(msg, "published"); |
| 831 | xs *fd = NULL; | ||
| 832 | |||
| 833 | if (published) | ||
| 834 | fd = mastoapi_date(published); | ||
| 835 | else { | ||
| 836 | xs *p = xs_str_iso_date(0); | ||
| 837 | fd = mastoapi_date(p); | ||
| 838 | } | ||
| 839 | |||
| 831 | st = xs_dict_append(st, "created_at", fd); | 840 | st = xs_dict_append(st, "created_at", fd); |
| 832 | 841 | ||
| 833 | { | 842 | { |