summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-06-15 17:51:24 +0200
committerdefault <nobody@localhost>2023-06-15 17:51:24 +0200
commit478cb2cf15324289884847412b61b193f51fb532 (patch)
treeb2b38e64b6baa581f775be01d4f9e2ec184a8e92 /html.c
parent8d9289a8151538fbf9554a2c252e2d2bf81c9456 (diff)
Use xs_stock_* values wherever possible.
Diffstat (limited to 'html.c')
-rw-r--r--html.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/html.c b/html.c
index b652064..b580faf 100644
--- a/html.c
+++ b/html.c
@@ -1851,9 +1851,7 @@ int html_post_handler(const xs_dict *req, const char *q_path,
msg = msg_note(&snac, content_2, to, in_reply_to, attach_list, priv);
if (sensitive != NULL) {
- xs *t = xs_val_new(XSTYPE_TRUE);
-
- msg = xs_dict_set(msg, "sensitive", t);
+ msg = xs_dict_set(msg, "sensitive", xs_stock_true);
msg = xs_dict_set(msg, "summary", "...");
}
@@ -2010,8 +2008,6 @@ int html_post_handler(const xs_dict *req, const char *q_path,
/* change of user data */
char *v;
char *p1, *p2;
- xs *byes = xs_val_new(XSTYPE_TRUE);
- xs *bno = xs_val_new(XSTYPE_FALSE);
if ((v = xs_dict_get(p_vars, "name")) != NULL)
snac.config = xs_dict_set(snac.config, "name", v);
@@ -2036,13 +2032,13 @@ int html_post_handler(const xs_dict *req, const char *q_path,
snac.config = xs_dict_set(snac.config, "purge_days", days);
}
if ((v = xs_dict_get(p_vars, "drop_dm_from_unknown")) != NULL && strcmp(v, "on") == 0)
- snac.config = xs_dict_set(snac.config, "drop_dm_from_unknown", byes);
+ snac.config = xs_dict_set(snac.config, "drop_dm_from_unknown", xs_stock_true);
else
- snac.config = xs_dict_set(snac.config, "drop_dm_from_unknown", bno);
+ snac.config = xs_dict_set(snac.config, "drop_dm_from_unknown", xs_stock_false);
if ((v = xs_dict_get(p_vars, "bot")) != NULL && strcmp(v, "on") == 0)
- snac.config = xs_dict_set(snac.config, "bot", byes);
+ snac.config = xs_dict_set(snac.config, "bot", xs_stock_true);
else
- snac.config = xs_dict_set(snac.config, "bot", bno);
+ snac.config = xs_dict_set(snac.config, "bot", xs_stock_false);
/* avatar upload */
xs_list *avatar_file = xs_dict_get(p_vars, "avatar_file");