diff options
| -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 | { |