Bläddra i källkod

Notify blocks.

default 2 år sedan
förälder
incheckning
f8fa7167e2
2 ändrade filer med 10 tillägg och 1 borttagningar
  1. 9 0
      activitypub.c
  2. 1 1
      html.c

+ 9 - 0
activitypub.c

@@ -2134,6 +2134,15 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req)
 
 
         enqueue_output_by_actor(snac, rsp, actor, 0);
         enqueue_output_by_actor(snac, rsp, actor, 0);
     }
     }
+    else
+    if (strcmp(type, "Block") == 0) { /** **/
+        snac_log(snac, xs_fmt("'Block' received from %s", actor));
+
+        /* should we MUTE the actor back? */
+        /* mute(snac, actor); */
+
+        do_notify = 1;
+    }
     else {
     else {
         srv_archive_error("unsupported_type", "unsupported_type", req, msg);
         srv_archive_error("unsupported_type", "unsupported_type", req, msg);
 
 

+ 1 - 1
html.c

@@ -2525,7 +2525,7 @@ xs_str *html_notifications(snac *user, int skip, int show)
                     xs_html_attr("title", date),
                     xs_html_attr("title", date),
                     xs_html_text(s_date))));
                     xs_html_text(s_date))));
 
 
-        if (strcmp(type, "Follow") == 0 || strcmp(utype, "Follow") == 0) {
+        if (strcmp(type, "Follow") == 0 || strcmp(utype, "Follow") == 0 || strcmp(type, "Block") == 0) {
             xs_html_add(entry,
             xs_html_add(entry,
                 xs_html_tag("div",
                 xs_html_tag("div",
                     xs_html_attr("class", "snac-post"),
                     xs_html_attr("class", "snac-post"),