From 815c39d0c6622169dfab9d0446ace3483ffb7554 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 14 Apr 2023 08:14:11 +0200 Subject: Added a dummy 'created_at' field for accounts that don't have a date. This avoid a crash in Tusky. --- mastoapi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mastoapi.c') diff --git a/mastoapi.c b/mastoapi.c index 74b62ba..4ce9b37 100644 --- a/mastoapi.c +++ b/mastoapi.c @@ -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); -- cgit v1.2.3