diff options
| author | 2025-01-05 09:34:00 +0100 | |
|---|---|---|
| committer | 2025-01-05 09:34:00 +0100 | |
| commit | 3a1cae73265aebdbe678d94fbdc16edf3ccc643f (patch) | |
| tree | 3c50341495d370dfeb7bfe0312ad5644d9c8f865 /html.c | |
| parent | Use the site's CSS in the /share page. (diff) | |
| download | snac2-3a1cae73265aebdbe678d94fbdc16edf3ccc643f.tar.gz snac2-3a1cae73265aebdbe678d94fbdc16edf3ccc643f.tar.xz snac2-3a1cae73265aebdbe678d94fbdc16edf3ccc643f.zip | |
Moved post language setting to msg_note(), where it really belongs.
On the way, posting from the Mastodon API sets the language accordingly.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -3515,7 +3515,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 3515 | const char *b64 = xs_dict_get(q_vars, "content"); | 3515 | const char *b64 = xs_dict_get(q_vars, "content"); |
| 3516 | int sz; | 3516 | int sz; |
| 3517 | xs *content = xs_base64_dec(b64, &sz); | 3517 | xs *content = xs_base64_dec(b64, &sz); |
| 3518 | xs *msg = msg_note(&snac, content, NULL, NULL, NULL, 0); | 3518 | xs *msg = msg_note(&snac, content, NULL, NULL, NULL, 0, NULL); |
| 3519 | xs *c_msg = msg_create(&snac, msg); | 3519 | xs *c_msg = msg_create(&snac, msg); |
| 3520 | 3520 | ||
| 3521 | timeline_add(&snac, xs_dict_get(msg, "id"), msg); | 3521 | timeline_add(&snac, xs_dict_get(msg, "id"), msg); |
| @@ -3661,7 +3661,7 @@ int html_post_handler(const xs_dict *req, const char *q_path, | |||
| 3661 | enqueue_close_question(&snac, xs_dict_get(msg, "id"), end_secs); | 3661 | enqueue_close_question(&snac, xs_dict_get(msg, "id"), end_secs); |
| 3662 | } | 3662 | } |
| 3663 | else | 3663 | else |
| 3664 | msg = msg_note(&snac, content_2, to, in_reply_to, attach_list, priv); | 3664 | msg = msg_note(&snac, content_2, to, in_reply_to, attach_list, priv, NULL); |
| 3665 | 3665 | ||
| 3666 | if (sensitive != NULL) { | 3666 | if (sensitive != NULL) { |
| 3667 | msg = xs_dict_set(msg, "sensitive", xs_stock(XSTYPE_TRUE)); | 3667 | msg = xs_dict_set(msg, "sensitive", xs_stock(XSTYPE_TRUE)); |
| @@ -4095,7 +4095,7 @@ int html_post_handler(const xs_dict *req, const char *q_path, | |||
| 4095 | int c = 0; | 4095 | int c = 0; |
| 4096 | 4096 | ||
| 4097 | while (xs_list_next(ls, &v, &c)) { | 4097 | while (xs_list_next(ls, &v, &c)) { |
| 4098 | xs *msg = msg_note(&snac, "", actor, irt, NULL, 1); | 4098 | xs *msg = msg_note(&snac, "", actor, irt, NULL, 1, NULL); |
| 4099 | 4099 | ||
| 4100 | /* set the option */ | 4100 | /* set the option */ |
| 4101 | msg = xs_dict_append(msg, "name", v); | 4101 | msg = xs_dict_append(msg, "name", v); |