feat: follow upstream twtxt post rules: reject control characters, allow U+2028, make the length cap configurable

This commit is contained in:
randogoth 2026-10-15 13:59:39 +03:00
parent dd6865782a
commit 801c66d3b0
12 changed files with 63 additions and 58 deletions

View file

@ -38,9 +38,8 @@ reason-prune-mode-unknown = Twt-Prune takes fifo or off, not "{ $got }".
## Limits on what a post can contain
reason-too-many-codepoints = A post can be up to 160 characters. Shorten it and send it again.
reason-too-many-bytes = A post can be up to 640 bytes, and accents and emoji use several each. Shorten it and send it again.
reason-forbidden-char = A post has to fit on one line. Take out the line breaks and tabs, then send it again.
reason-too-long = A post can be up to { $max } characters. Shorten it and send it again.
reason-forbidden-char = A post has to fit on one line, without tabs or other control characters. Take them out and send it again.
reason-bad-timestamp = That isn't a time we can read. Use the form 2026-10-14T19:39:39Z.
reason-duplicate-timestamp = Your feed already has a post at that time.
@ -150,7 +149,7 @@ help-body =
Your feed: { $url }
Send a message to this address and it becomes a post. We publish exactly
what you write, up to 160 characters, on one line.
what you write, on one line.
To manage your feed, add one of these headers. One per message.