diff options
| -rw-r--r-- | activitypub.c | 1 | ||||
| -rw-r--r-- | html.c | 18 | ||||
| -rw-r--r-- | utils.c | 14 | ||||
| -rw-r--r-- | xs_mime.h | 4 |
4 files changed, 18 insertions, 19 deletions
diff --git a/activitypub.c b/activitypub.c index fa592e7..9fe293c 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -1154,7 +1154,6 @@ xs_dict *msg_question(snac *user, const char *content, xs_list *attach, | |||
| 1154 | const xs_list *opts, int multiple, int end_secs) | 1154 | const xs_list *opts, int multiple, int end_secs) |
| 1155 | /* creates a Question message */ | 1155 | /* creates a Question message */ |
| 1156 | { | 1156 | { |
| 1157 | xs *ntid = tid(0); | ||
| 1158 | xs_dict *msg = msg_note(user, content, NULL, NULL, attach, 0); | 1157 | xs_dict *msg = msg_note(user, content, NULL, NULL, attach, 0); |
| 1159 | int max = 8; | 1158 | int max = 8; |
| 1160 | xs_set seen; | 1159 | xs_set seen; |
| @@ -549,26 +549,26 @@ d_char *html_top_controls(snac *snac, d_char *s) | |||
| 549 | 549 | ||
| 550 | L("User setup..."), | 550 | L("User setup..."), |
| 551 | snac->actor, | 551 | snac->actor, |
| 552 | L("User name"), | 552 | L("Display name"), |
| 553 | xs_dict_get(snac->config, "name"), | 553 | encode_html(xs_dict_get(snac->config, "name")), |
| 554 | L("Avatar"), | 554 | L("Avatar"), |
| 555 | L("Bio"), | 555 | L("Bio"), |
| 556 | xs_dict_get(snac->config, "bio"), | 556 | encode_html(xs_dict_get(snac->config, "bio")), |
| 557 | strcmp(cw, "open") == 0 ? "checked" : "", | 557 | strcmp(cw, "open") == 0 ? "checked" : "", |
| 558 | L("Always show sensitive content"), | 558 | L("Always show sensitive content"), |
| 559 | L("Email address for notifications"), | 559 | L("Email address for notifications"), |
| 560 | email, | 560 | encode_html(email), |
| 561 | L("Telegram notifications (bot key and chat id)"), | 561 | L("Telegram notifications (bot key and chat id)"), |
| 562 | telegram_bot, | 562 | encode_html(telegram_bot), |
| 563 | telegram_chat_id, | 563 | encode_html(telegram_chat_id), |
| 564 | L("Maximum days to keep posts (0: server settings)"), | 564 | L("Maximum days to keep posts (0: server settings)"), |
| 565 | purge_days, | 565 | encode_html(purge_days), |
| 566 | xs_type(d_dm_f_u) == XSTYPE_TRUE ? "checked" : "", | 566 | xs_type(d_dm_f_u) == XSTYPE_TRUE ? "checked" : "", |
| 567 | L("Drop direct messages from people you don't follow"), | 567 | L("Drop direct messages from people you don't follow"), |
| 568 | xs_type(bot) == XSTYPE_TRUE ? "checked" : "", | 568 | xs_type(bot) == XSTYPE_TRUE ? "checked" : "", |
| 569 | L("This account is a bot"), | 569 | L("This account is a bot"), |
| 570 | L("Password (only to change it)"), | 570 | L("New Password"), |
| 571 | L("Repeat Password"), | 571 | L("Repeat New Password"), |
| 572 | L("Update user info") | 572 | L("Update user info") |
| 573 | ); | 573 | ); |
| 574 | 574 | ||
| @@ -85,7 +85,7 @@ int snac_init(const char *basedir) | |||
| 85 | FILE *f; | 85 | FILE *f; |
| 86 | 86 | ||
| 87 | if (basedir == NULL) { | 87 | if (basedir == NULL) { |
| 88 | printf("Base directory:\n"); | 88 | printf("Base directory: "); |
| 89 | srv_basedir = xs_strip_i(xs_readline(stdin)); | 89 | srv_basedir = xs_strip_i(xs_readline(stdin)); |
| 90 | } | 90 | } |
| 91 | else | 91 | else |
| @@ -98,7 +98,7 @@ int snac_init(const char *basedir) | |||
| 98 | srv_basedir = xs_crop_i(srv_basedir, 0, -1); | 98 | srv_basedir = xs_crop_i(srv_basedir, 0, -1); |
| 99 | 99 | ||
| 100 | if (mtime(srv_basedir) != 0.0) { | 100 | if (mtime(srv_basedir) != 0.0) { |
| 101 | printf("ERROR: directory '%s' must not exist\n", srv_basedir); | 101 | printf("ERROR: directory '%s' must not exist.\n", srv_basedir); |
| 102 | return 1; | 102 | return 1; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| @@ -107,14 +107,14 @@ int snac_init(const char *basedir) | |||
| 107 | xs *layout = xs_number_new(disk_layout); | 107 | xs *layout = xs_number_new(disk_layout); |
| 108 | srv_config = xs_dict_set(srv_config, "layout", layout); | 108 | srv_config = xs_dict_set(srv_config, "layout", layout); |
| 109 | 109 | ||
| 110 | printf("Network address [%s]:\n", xs_dict_get(srv_config, "address")); | 110 | printf("Network address [%s]: ", xs_dict_get(srv_config, "address")); |
| 111 | { | 111 | { |
| 112 | xs *i = xs_strip_i(xs_readline(stdin)); | 112 | xs *i = xs_strip_i(xs_readline(stdin)); |
| 113 | if (*i) | 113 | if (*i) |
| 114 | srv_config = xs_dict_set(srv_config, "address", i); | 114 | srv_config = xs_dict_set(srv_config, "address", i); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | printf("Network port [%d]:\n", (int)xs_number_get(xs_dict_get(srv_config, "port"))); | 117 | printf("Network port [%d]: ", (int)xs_number_get(xs_dict_get(srv_config, "port"))); |
| 118 | { | 118 | { |
| 119 | xs *i = xs_strip_i(xs_readline(stdin)); | 119 | xs *i = xs_strip_i(xs_readline(stdin)); |
| 120 | if (*i) { | 120 | if (*i) { |
| @@ -123,7 +123,7 @@ int snac_init(const char *basedir) | |||
| 123 | } | 123 | } |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | printf("Host name:\n"); | 126 | printf("Host name: "); |
| 127 | { | 127 | { |
| 128 | xs *i = xs_strip_i(xs_readline(stdin)); | 128 | xs *i = xs_strip_i(xs_readline(stdin)); |
| 129 | if (*i == '\0') | 129 | if (*i == '\0') |
| @@ -132,7 +132,7 @@ int snac_init(const char *basedir) | |||
| 132 | srv_config = xs_dict_set(srv_config, "host", i); | 132 | srv_config = xs_dict_set(srv_config, "host", i); |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | printf("URL prefix:\n"); | 135 | printf("URL prefix: "); |
| 136 | { | 136 | { |
| 137 | xs *i = xs_strip_i(xs_readline(stdin)); | 137 | xs *i = xs_strip_i(xs_readline(stdin)); |
| 138 | 138 | ||
| @@ -144,7 +144,7 @@ int snac_init(const char *basedir) | |||
| 144 | } | 144 | } |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | printf("Admin email address (optional):\n"); | 147 | printf("Admin email address (optional): "); |
| 148 | { | 148 | { |
| 149 | xs *i = xs_strip_i(xs_readline(stdin)); | 149 | xs *i = xs_strip_i(xs_readline(stdin)); |
| 150 | 150 | ||
| @@ -30,8 +30,8 @@ struct _mime_info { | |||
| 30 | { "audio/mp3", ".mp3"}, | 30 | { "audio/mp3", ".mp3"}, |
| 31 | { "audio/ogg", ".ogg"}, | 31 | { "audio/ogg", ".ogg"}, |
| 32 | { "audio/ogg", ".oga"}, | 32 | { "audio/ogg", ".oga"}, |
| 33 | { "audio/opus", ".opus"}, | 33 | { "audio/ogg", ".opus"}, |
| 34 | { "audio/flac", ".flac"}, | 34 | { "audio/flac", ".flac"}, |
| 35 | { "audio/wav", ".wav"}, | 35 | { "audio/wav", ".wav"}, |
| 36 | { "audio/wma", ".wma"}, | 36 | { "audio/wma", ".wma"}, |
| 37 | { "audio/aac", ".aac"}, | 37 | { "audio/aac", ".aac"}, |