all_usernames. Internal helper function. This docstring was added automatically to improve maintainability. Returns: Varies.
()
| 14316 | """ |
| 14317 | me = current_user() |
| 14318 | username = (username or "").strip() |
| 14319 | |
| 14320 | is_ajax = ( |
| 14321 | request.headers.get("X-Requested-With") == "XMLHttpRequest" |
| 14322 | or "application/json" in (request.headers.get("Accept", "")) |
| 14323 | ) |
| 14324 | |
| 14325 | body = (request.form.get("body") or "").strip() |
| 14326 | voice = request.files.get("voice") |
| 14327 | upfile = request.files.get("file") |
| 14328 | gif = request.files.get("gif") |
| 14329 | gif_url = (request.form.get("gif_url") or "").strip() |
| 14330 | |
| 14331 | # Enforce per-attachment size limits (33MB) to keep chats fast/stable. |
| 14332 | if voice and getattr(voice, "filename", ""): |
| 14333 | vsz = _filestorage_size(voice) |
| 14334 | if vsz is not None and vsz > CHAT_MAX_BYTES: |
no test coverage detected