summaryrefslogtreecommitdiff
path: root/snac.h
diff options
context:
space:
mode:
Diffstat (limited to 'snac.h')
-rw-r--r--snac.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/snac.h b/snac.h
index e5efc0b..153c429 100644
--- a/snac.h
+++ b/snac.h
@@ -1,7 +1,7 @@
1/* snac - A simple, minimalistic ActivityPub instance */ 1/* snac - A simple, minimalistic ActivityPub instance */
2/* copyright (c) 2022 - 2026 grunfink et al. / MIT license */ 2/* copyright (c) 2022 - 2026 grunfink et al. / MIT license */
3 3
4#define VERSION "2.87" 4#define VERSION "2.90"
5 5
6#define USER_AGENT "snac/" VERSION 6#define USER_AGENT "snac/" VERSION
7 7
@@ -35,10 +35,12 @@ extern xs_dict *srv_config;
35extern xs_str *srv_baseurl; 35extern xs_str *srv_baseurl;
36extern xs_str *srv_proxy_token_seed; 36extern xs_str *srv_proxy_token_seed;
37extern xs_dict *srv_langs; 37extern xs_dict *srv_langs;
38extern const char *months[12];
38 39
39extern int dbglevel; 40extern int dbglevel;
40 41
41#define L(s) lang_str((s), user) 42#define L(s) lang_str((s), user)
43#define LL(s) (s)
42 44
43#define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video|Audio|Event" 45#define POSTLIKE_OBJECT_TYPE "Note|Question|Page|Article|Video|Audio|Event"
44 46
@@ -105,6 +107,10 @@ int validate_uid(const char *uid);
105xs_str *hash_password(const char *uid, const char *passwd, const char *nonce); 107xs_str *hash_password(const char *uid, const char *passwd, const char *nonce);
106int check_password(const char *uid, const char *passwd, const char *hash); 108int check_password(const char *uid, const char *passwd, const char *hash);
107 109
110char* findprog(const char *prog);
111int strip_media(const char *fn);
112int check_strip_tool(void);
113
108void srv_archive(const char *direction, const char *url, xs_dict *req, 114void srv_archive(const char *direction, const char *url, xs_dict *req,
109 const char *payload, int p_size, 115 const char *payload, int p_size,
110 int status, xs_dict *headers, 116 int status, xs_dict *headers,
@@ -274,6 +280,7 @@ void notify_add(snac *snac, const char *type, const char *utype,
274xs_dict *notify_get(snac *snac, const char *id); 280xs_dict *notify_get(snac *snac, const char *id);
275int notify_new_num(snac *snac); 281int notify_new_num(snac *snac);
276xs_list *notify_list(snac *snac, int skip, int show); 282xs_list *notify_list(snac *snac, int skip, int show);
283xs_list *notify_filter_list(snac *snac, xs_list *ids);
277void notify_clear(snac *snac); 284void notify_clear(snac *snac);
278 285
279xs_dict *markers_get(snac *snac, const xs_list *markers); 286xs_dict *markers_get(snac *snac, const xs_list *markers);
@@ -412,6 +419,7 @@ int activitypub_post_handler(const xs_dict *req, const char *q_path,
412 char **body, int *b_size, char **ctype); 419 char **body, int *b_size, char **ctype);
413 420
414xs_dict *emojis(void); 421xs_dict *emojis(void);
422xs_dict *emojis_rm_categories(void);
415xs_str *format_text_with_emoji(snac *user, const char *text, int ems, const char *proxy); 423xs_str *format_text_with_emoji(snac *user, const char *text, int ems, const char *proxy);
416xs_str *not_really_markdown(const char *content, xs_list **attach, xs_list **tag); 424xs_str *not_really_markdown(const char *content, xs_list **attach, xs_list **tag);
417xs_str *sanitize(const char *content); 425xs_str *sanitize(const char *content);