diff options
| author | 2023-04-13 17:56:00 +0200 | |
|---|---|---|
| committer | 2023-04-13 17:56:00 +0200 | |
| commit | 51208b10c168e9b15ccae255d73fae38ae717fdf (patch) | |
| tree | 82067d9d1fe0023c69ada2e9dc705125ef096d42 /data.c | |
| parent | New functions notify_get() and notify_list(). (diff) | |
| download | snac2-51208b10c168e9b15ccae255d73fae38ae717fdf.tar.gz snac2-51208b10c168e9b15ccae255d73fae38ae717fdf.tar.xz snac2-51208b10c168e9b15ccae255d73fae38ae717fdf.zip | |
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, | |||
| 1525 | noti = xs_dict_append(noti, "type", type); | 1525 | noti = xs_dict_append(noti, "type", type); |
| 1526 | noti = xs_dict_append(noti, "utype", utype); | 1526 | noti = xs_dict_append(noti, "utype", utype); |
| 1527 | noti = xs_dict_append(noti, "actor", actor); | 1527 | noti = xs_dict_append(noti, "actor", actor); |
| 1528 | noti = xs_dict_append(noti, "objid", objid); | ||
| 1529 | noti = xs_dict_append(noti, "date", date); | 1528 | noti = xs_dict_append(noti, "date", date); |
| 1530 | 1529 | ||
| 1530 | if (!xs_is_null(objid)) | ||
| 1531 | noti = xs_dict_append(noti, "objid", objid); | ||
| 1532 | |||
| 1531 | if ((f = fopen(fn, "w")) != NULL) { | 1533 | if ((f = fopen(fn, "w")) != NULL) { |
| 1532 | xs *j = xs_json_dumps_pp(noti, 4); | 1534 | xs *j = xs_json_dumps_pp(noti, 4); |
| 1533 | 1535 | ||