diff options
| author | 2023-03-02 09:01:08 +0100 | |
|---|---|---|
| committer | 2023-03-02 09:01:08 +0100 | |
| commit | e74ae0f58971e12422068f85e35fc7928206e9f9 (patch) | |
| tree | 9fc80a58cc301d076837837eab5e54ff7ae76793 | |
| parent | New inbox collection functions. (diff) | |
| download | snac2-e74ae0f58971e12422068f85e35fc7928206e9f9.tar.gz snac2-e74ae0f58971e12422068f85e35fc7928206e9f9.tar.xz snac2-e74ae0f58971e12422068f85e35fc7928206e9f9.zip | |
Renamed inboxes/ to inbox/.
| -rw-r--r-- | activitypub.c | 3 | ||||
| -rw-r--r-- | data.c | 15 |
2 files changed, 15 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c index 663fa24..498ba1f 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -279,6 +279,7 @@ d_char *recipient_list(snac *snac, char *msg, int expand_public) | |||
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | 281 | ||
| 282 | #if 0 | ||
| 282 | d_char *inbox_list(snac *snac, char *msg) | 283 | d_char *inbox_list(snac *snac, char *msg) |
| 283 | /* returns the list of inboxes that are recipients of this message */ | 284 | /* returns the list of inboxes that are recipients of this message */ |
| 284 | { | 285 | { |
| @@ -302,7 +303,7 @@ d_char *inbox_list(snac *snac, char *msg) | |||
| 302 | 303 | ||
| 303 | return xs_set_result(&inboxes); | 304 | return xs_set_result(&inboxes); |
| 304 | } | 305 | } |
| 305 | 306 | #endif | |
| 306 | 307 | ||
| 307 | int is_msg_public(snac *snac, char *msg) | 308 | int is_msg_public(snac *snac, char *msg) |
| 308 | /* checks if a message is public */ | 309 | /* checks if a message is public */ |
| @@ -96,7 +96,7 @@ int srv_open(char *basedir, int auto_upgrade) | |||
| 96 | xs *qdir = xs_fmt("%s/queue", srv_basedir); | 96 | xs *qdir = xs_fmt("%s/queue", srv_basedir); |
| 97 | mkdirx(qdir); | 97 | mkdirx(qdir); |
| 98 | 98 | ||
| 99 | xs *ibdir = xs_fmt("%s/inboxes", srv_basedir); | 99 | xs *ibdir = xs_fmt("%s/inbox", srv_basedir); |
| 100 | mkdirx(ibdir); | 100 | mkdirx(ibdir); |
| 101 | 101 | ||
| 102 | #ifdef __OpenBSD__ | 102 | #ifdef __OpenBSD__ |
| @@ -1372,7 +1372,7 @@ void inbox_add(const char *inbox) | |||
| 1372 | /* collects a shared inbox */ | 1372 | /* collects a shared inbox */ |
| 1373 | { | 1373 | { |
| 1374 | xs *md5 = xs_md5_hex(inbox, strlen(inbox)); | 1374 | xs *md5 = xs_md5_hex(inbox, strlen(inbox)); |
| 1375 | xs *fn = xs_fmt("%s/inboxes/%s", srv_basedir, md5); | 1375 | xs *fn = xs_fmt("%s/inbox/%s", srv_basedir, md5); |
| 1376 | FILE *f; | 1376 | FILE *f; |
| 1377 | 1377 | ||
| 1378 | if ((f = fopen(fn, "w")) != NULL) { | 1378 | if ((f = fopen(fn, "w")) != NULL) { |
| @@ -1397,6 +1397,17 @@ void inbox_add_by_actor(const xs_dict *actor) | |||
| 1397 | } | 1397 | } |
| 1398 | 1398 | ||
| 1399 | 1399 | ||
| 1400 | #if 0 | ||
| 1401 | xs_list *inbox_list(void) | ||
| 1402 | /* returns the collected inboxes as a list */ | ||
| 1403 | { | ||
| 1404 | xs_list *l = xs_list_new(); | ||
| 1405 | |||
| 1406 | return l; | ||
| 1407 | } | ||
| 1408 | #endif | ||
| 1409 | |||
| 1410 | |||
| 1400 | /** the queue **/ | 1411 | /** the queue **/ |
| 1401 | 1412 | ||
| 1402 | static xs_dict *_enqueue_put(const char *fn, xs_dict *msg) | 1413 | static xs_dict *_enqueue_put(const char *fn, xs_dict *msg) |