Browse Source

Minor semantic tweak.

default 2 months ago
parent
commit
64f2d3d746
2 changed files with 6 additions and 2 deletions
  1. 5 1
      activitypub.c
  2. 1 1
      snac.h

+ 5 - 1
activitypub.c

@@ -1423,8 +1423,9 @@ xs_dict *msg_follow(snac *snac, const char *q)
 
 xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
                   const xs_str *in_reply_to, const xs_list *attach,
-                  int priv, const char *lang_str)
+                  int scope, const char *lang_str)
 /* creates a 'Note' message */
+/* scope: 0, public; 1, private (mentioned only); 2, "quiet public"; 3, followers only */
 {
     xs *ntid = tid(0);
     xs *id   = xs_fmt("%s/p/%s", snac->actor, ntid);
@@ -1440,6 +1441,9 @@ xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
     xs_list *p;
     const xs_val *v;
 
+    /* FIXME: implement scopes 2 and 3 */
+    int priv = scope == 1;
+
     if (rcpts == NULL)
         to = xs_list_new();
     else {

+ 1 - 1
snac.h

@@ -317,7 +317,7 @@ xs_dict *msg_follow(snac *snac, const char *actor);
 
 xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
                   const xs_str *in_reply_to, const xs_list *attach,
-                  int priv, const char *lang);
+                  int scope, const char *lang);
 
 xs_dict *msg_undo(snac *snac, const xs_val *object);
 xs_dict *msg_delete(snac *snac, const char *id);