diff options
| author | 2024-07-30 18:27:09 +0200 | |
|---|---|---|
| committer | 2024-07-30 18:27:09 +0200 | |
| commit | f8fa7167e2ad67f63d7e873f87e7dab8a782bc17 (patch) | |
| tree | 2d9e10bcb8775a2370d4b4e069826ad339ad861f | |
| parent | On send, consider HTTP status 422 (UNPROCESSABLE_CONTENT) as a fatal error. (diff) | |
| download | snac2-f8fa7167e2ad67f63d7e873f87e7dab8a782bc17.tar.gz snac2-f8fa7167e2ad67f63d7e873f87e7dab8a782bc17.tar.xz snac2-f8fa7167e2ad67f63d7e873f87e7dab8a782bc17.zip | |
Notify blocks.
| -rw-r--r-- | activitypub.c | 9 | ||||
| -rw-r--r-- | html.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c index 5c52959..437cfaf 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -2134,6 +2134,15 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req) | |||
| 2134 | 2134 | ||
| 2135 | enqueue_output_by_actor(snac, rsp, actor, 0); | 2135 | enqueue_output_by_actor(snac, rsp, actor, 0); |
| 2136 | } | 2136 | } |
| 2137 | else | ||
| 2138 | if (strcmp(type, "Block") == 0) { /** **/ | ||
| 2139 | snac_log(snac, xs_fmt("'Block' received from %s", actor)); | ||
| 2140 | |||
| 2141 | /* should we MUTE the actor back? */ | ||
| 2142 | /* mute(snac, actor); */ | ||
| 2143 | |||
| 2144 | do_notify = 1; | ||
| 2145 | } | ||
| 2137 | else { | 2146 | else { |
| 2138 | srv_archive_error("unsupported_type", "unsupported_type", req, msg); | 2147 | srv_archive_error("unsupported_type", "unsupported_type", req, msg); |
| 2139 | 2148 | ||
| @@ -2525,7 +2525,7 @@ xs_str *html_notifications(snac *user, int skip, int show) | |||
| 2525 | xs_html_attr("title", date), | 2525 | xs_html_attr("title", date), |
| 2526 | xs_html_text(s_date)))); | 2526 | xs_html_text(s_date)))); |
| 2527 | 2527 | ||
| 2528 | if (strcmp(type, "Follow") == 0 || strcmp(utype, "Follow") == 0) { | 2528 | if (strcmp(type, "Follow") == 0 || strcmp(utype, "Follow") == 0 || strcmp(type, "Block") == 0) { |
| 2529 | xs_html_add(entry, | 2529 | xs_html_add(entry, |
| 2530 | xs_html_tag("div", | 2530 | xs_html_tag("div", |
| 2531 | xs_html_attr("class", "snac-post"), | 2531 | xs_html_attr("class", "snac-post"), |