diff options
| author | 2024-01-12 09:07:55 +0000 | |
|---|---|---|
| committer | 2024-01-12 09:07:55 +0000 | |
| commit | 82d57557bb9a16f18ed5acc874d283ef0e9f47f5 (patch) | |
| tree | 55d12af8b3e0f3f6d378c14250f9a7331f36e5e7 | |
| parent | Updated RELEASE_NOTES.md to add ntfy.sh support (diff) | |
| download | penes-snac2-82d57557bb9a16f18ed5acc874d283ef0e9f47f5.tar.gz penes-snac2-82d57557bb9a16f18ed5acc874d283ef0e9f47f5.tar.xz penes-snac2-82d57557bb9a16f18ed5acc874d283ef0e9f47f5.zip | |
ntfy code cleanup
| -rw-r--r-- | activitypub.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c index d937726..566c240 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -805,7 +805,7 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor, | |||
| 805 | char *ntfy_server = xs_dict_get(snac->config, "ntfy_server"); | 805 | char *ntfy_server = xs_dict_get(snac->config, "ntfy_server"); |
| 806 | char *ntfy_token = xs_dict_get(snac->config, "ntfy_token"); | 806 | char *ntfy_token = xs_dict_get(snac->config, "ntfy_token"); |
| 807 | 807 | ||
| 808 | if (!xs_is_null(ntfy_server) && *ntfy_server ) | 808 | if (!xs_is_null(ntfy_server) && *ntfy_server) |
| 809 | enqueue_ntfy(body, ntfy_server, ntfy_token); | 809 | enqueue_ntfy(body, ntfy_server, ntfy_token); |
| 810 | 810 | ||
| 811 | /* finally, store it in the notification folder */ | 811 | /* finally, store it in the notification folder */ |
| @@ -2156,7 +2156,6 @@ void process_queue_item(xs_dict *q_item) | |||
| 2156 | int status = 0; | 2156 | int status = 0; |
| 2157 | 2157 | ||
| 2158 | xs *url = xs_fmt("%s", ntfy_server); | 2158 | xs *url = xs_fmt("%s", ntfy_server); |
| 2159 | //xs *body = xs_fmt("\"text\":\"%s\"}", msg); | ||
| 2160 | xs *body = xs_fmt("%s", msg); | 2159 | xs *body = xs_fmt("%s", msg); |
| 2161 | 2160 | ||
| 2162 | xs *headers = xs_dict_new(); | 2161 | xs *headers = xs_dict_new(); |