From 51208b10c168e9b15ccae255d73fae38ae717fdf Mon Sep 17 00:00:00 2001 From: default Date: Thu, 13 Apr 2023 17:56:00 +0200 Subject: Implemented mastoapi notifications. --- data.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'data.c') diff --git a/data.c b/data.c index 939ede6..026ae7b 100644 --- a/data.c +++ b/data.c @@ -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); -- cgit v1.2.3