commit 64f2d3d

default  ·  2025-01-07 07:08:51 +0000 UTC
parent b2bd4e1
Minor semantic tweak.
2 files changed,  +6, -2
M snac.h
+5, -1
 1@@ -1423,8 +1423,9 @@ xs_dict *msg_follow(snac *snac, const char *q)
 2 
 3 xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
 4                   const xs_str *in_reply_to, const xs_list *attach,
 5-                  int priv, const char *lang_str)
 6+                  int scope, const char *lang_str)
 7 /* creates a 'Note' message */
 8+/* scope: 0, public; 1, private (mentioned only); 2, "quiet public"; 3, followers only */
 9 {
10     xs *ntid = tid(0);
11     xs *id   = xs_fmt("%s/p/%s", snac->actor, ntid);
12@@ -1440,6 +1441,9 @@ xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
13     xs_list *p;
14     const xs_val *v;
15 
16+    /* FIXME: implement scopes 2 and 3 */
17+    int priv = scope == 1;
18+
19     if (rcpts == NULL)
20         to = xs_list_new();
21     else {
M snac.h
+1, -1
1@@ -317,7 +317,7 @@ xs_dict *msg_follow(snac *snac, const char *actor);
2 
3 xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
4                   const xs_str *in_reply_to, const xs_list *attach,
5-                  int priv, const char *lang);
6+                  int scope, const char *lang);
7 
8 xs_dict *msg_undo(snac *snac, const xs_val *object);
9 xs_dict *msg_delete(snac *snac, const char *id);