diff options
author | default <nobody@localhost> | 2023-04-14 08:14:11 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-04-14 08:14:11 +0200 |
commit | 815c39d0c6622169dfab9d0446ace3483ffb7554 (patch) | |
tree | 5d220dbb9d250348d0c0d11b43c80cfb02aae16c | |
parent | c66cd2edb52bedcbc8be6a89ee64f146778f5c32 (diff) |
Added a dummy 'created_at' field for accounts that don't have a date.
This avoid a crash in Tusky.
-rw-r--r-- | mastoapi.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -432,6 +432,11 @@ xs_dict *mastoapi_account(const xs_dict *actor) if (pub) acct = xs_dict_append(acct, "created_at", pub); + else { + /* unset created_at crashes Tusky, so lie like a mf */ + xs *date = xs_str_utctime(0, "%Y-%m-%dT%H:%M:%SZ"); + acct = xs_dict_append(acct, "created_at", date); + } acct = xs_dict_append(acct, "note", xs_dict_get(actor, "summary")); acct = xs_dict_append(acct, "url", id); |