summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2025-01-07 08:08:51 +0100
committerGravatar default2025-01-07 08:08:51 +0100
commit64f2d3d746d8536c460b88fc852fdca01c5c813c (patch)
tree6141b84b9ddb58b43003cea309b20209b8d39164
parentUpdated documentation. (diff)
downloadsnac2-64f2d3d746d8536c460b88fc852fdca01c5c813c.tar.gz
snac2-64f2d3d746d8536c460b88fc852fdca01c5c813c.tar.xz
snac2-64f2d3d746d8536c460b88fc852fdca01c5c813c.zip
Minor semantic tweak.
-rw-r--r--activitypub.c6
-rw-r--r--snac.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c
index 1ae5ad9..0740d3d 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1423,8 +1423,9 @@ xs_dict *msg_follow(snac *snac, const char *q)
1423 1423
1424xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts, 1424xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
1425 const xs_str *in_reply_to, const xs_list *attach, 1425 const xs_str *in_reply_to, const xs_list *attach,
1426 int priv, const char *lang_str) 1426 int scope, const char *lang_str)
1427/* creates a 'Note' message */ 1427/* creates a 'Note' message */
1428/* scope: 0, public; 1, private (mentioned only); 2, "quiet public"; 3, followers only */
1428{ 1429{
1429 xs *ntid = tid(0); 1430 xs *ntid = tid(0);
1430 xs *id = xs_fmt("%s/p/%s", snac->actor, ntid); 1431 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,
1440 xs_list *p; 1441 xs_list *p;
1441 const xs_val *v; 1442 const xs_val *v;
1442 1443
1444 /* FIXME: implement scopes 2 and 3 */
1445 int priv = scope == 1;
1446
1443 if (rcpts == NULL) 1447 if (rcpts == NULL)
1444 to = xs_list_new(); 1448 to = xs_list_new();
1445 else { 1449 else {
diff --git a/snac.h b/snac.h
index ec3ee5c..75db4a9 100644
--- a/snac.h
+++ b/snac.h
@@ -317,7 +317,7 @@ xs_dict *msg_follow(snac *snac, const char *actor);
317 317
318xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts, 318xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts,
319 const xs_str *in_reply_to, const xs_list *attach, 319 const xs_str *in_reply_to, const xs_list *attach,
320 int priv, const char *lang); 320 int scope, const char *lang);
321 321
322xs_dict *msg_undo(snac *snac, const xs_val *object); 322xs_dict *msg_undo(snac *snac, const xs_val *object);
323xs_dict *msg_delete(snac *snac, const char *id); 323xs_dict *msg_delete(snac *snac, const char *id);