diff options
author | default <nobody@localhost> | 2023-04-13 17:56:00 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-04-13 17:56:00 +0200 |
commit | 51208b10c168e9b15ccae255d73fae38ae717fdf (patch) | |
tree | 82067d9d1fe0023c69ada2e9dc705125ef096d42 /data.c | |
parent | 1a27e67ed9e4c4b12d9ee4d151c7647043b54647 (diff) |
Implemented mastoapi notifications.
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1525,9 +1525,11 @@ void notify_add(snac *snac, const char *type, const char *utype, noti = xs_dict_append(noti, "type", type); noti = xs_dict_append(noti, "utype", utype); noti = xs_dict_append(noti, "actor", actor); - noti = xs_dict_append(noti, "objid", objid); noti = xs_dict_append(noti, "date", date); + if (!xs_is_null(objid)) + noti = xs_dict_append(noti, "objid", objid); + if ((f = fopen(fn, "w")) != NULL) { xs *j = xs_json_dumps_pp(noti, 4); |