mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
Fixed bad JSON for accounts that do not have a 'summary' field.
This commit is contained in:
parent
04ba2818cb
commit
177bf03e10
1 changed files with 6 additions and 1 deletions
|
@ -456,7 +456,12 @@ xs_dict *mastoapi_account(const xs_dict *actor)
|
|||
acct = xs_dict_append(acct, "created_at", date);
|
||||
}
|
||||
|
||||
acct = xs_dict_append(acct, "note", xs_dict_get(actor, "summary"));
|
||||
const char *note = xs_dict_get(actor, "summary");
|
||||
if (xs_is_null(note))
|
||||
note = "";
|
||||
|
||||
acct = xs_dict_append(acct, "note", note);
|
||||
|
||||
acct = xs_dict_append(acct, "url", id);
|
||||
|
||||
xs *avatar = NULL;
|
||||
|
|
Loading…
Reference in a new issue