commit 177bf03

default  ·  2023-04-23 13:23:20 +0000 UTC
parent 04ba281
Fixed bad JSON for accounts that do not have a 'summary' field.
1 files changed,  +6, -1
+6, -1
 1@@ -456,7 +456,12 @@ xs_dict *mastoapi_account(const xs_dict *actor)
 2         acct = xs_dict_append(acct, "created_at", date);
 3     }
 4 
 5-    acct = xs_dict_append(acct, "note",         xs_dict_get(actor, "summary"));
 6+    const char *note = xs_dict_get(actor, "summary");
 7+    if (xs_is_null(note))
 8+        note = "";
 9+
10+    acct = xs_dict_append(acct, "note", note);
11+
12     acct = xs_dict_append(acct, "url",          id);
13 
14     xs *avatar  = NULL;