run modernize

This commit is contained in:
Kovid Goyal
2025-11-11 17:09:37 +05:30
parent 1faf786bd2
commit 6f588a0c29
30 changed files with 46 additions and 60 deletions

View File

@@ -39,10 +39,7 @@ func parse_send_text(io_data *rc_io_data, args []string) error {
}
text := strings.Join(args, " ")
text_gen := func(io_data *rc_io_data) (bool, error) {
limit := len(text)
if limit > 2048 {
limit = 2048
}
limit := min(len(text), 2048)
set_payload_data(io_data, "base64:"+base64.StdEncoding.EncodeToString(utils.UnsafeStringToBytes(text[:limit])))
text = text[limit:]
return len(text) == 0, nil