-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose the channel's max text length #9590
Comments
The reason why I proposed exposing this is to allow for client-side validation of the message length. Currently it is not possible to know in advance what that max length is, as it depends on the envvar mentioned above, and apparently on the channel itself, too, since as far as I can tell, announce channels are exempt from it anyways. |
Rather than exposing, can we just change osu-web to auto-truncate like what bancho did? |
In my opinion it'd be better UX to have a char limit client-side anyways, so you'd know when your message will be truncated. And for that, the character limit must be exposed |
I feel as if auto-truncating would be mean to the user who typed a long message and didn't know about auto-truncating. |
That would not be the case as messages should be resolved by the client with the actual final content. |
Adding the limit info in the channel json shouldn't be too difficult... as a bonus osu-web frontend can use it as well as it's currently limited to 1k for all types to accommodate announce message |
A follow-up issue from ppy/osu#21330, in order to fix this, we need to expose the channel's max text length to have different max lengths for different chat text boxes as said by @bdach ppy/osu#21397 (comment).
osu-web/config/osu.php
Line 80 in 7d89312
The text was updated successfully, but these errors were encountered: