commit 815c39d
default
·
2023-04-14 06:14:11 +0000 UTC
parent c66cd2e
Added a dummy 'created_at' field for accounts that don't have a date. This avoid a crash in Tusky.
1 files changed,
+5,
-0
+5,
-0
1@@ -432,6 +432,11 @@ xs_dict *mastoapi_account(const xs_dict *actor)
2
3 if (pub)
4 acct = xs_dict_append(acct, "created_at", pub);
5+ else {
6+ /* unset created_at crashes Tusky, so lie like a mf */
7+ xs *date = xs_str_utctime(0, "%Y-%m-%dT%H:%M:%SZ");
8+ acct = xs_dict_append(acct, "created_at", date);
9+ }
10
11 acct = xs_dict_append(acct, "note", xs_dict_get(actor, "summary"));
12 acct = xs_dict_append(acct, "url", id);