(val: Any)
| 15486 | return redirect(url_for("group_chat", gid=gid)) |
| 15487 | |
| 15488 | def _group_store_voice(gm_id: int, file_storage) -> Tuple[int, str]: |
| 15489 | """Store a group voice message (plaintext on disk).""" |
| 15490 | mime = _validate_chat_voice_upload(file_storage) |
| 15491 | conn = db_connect() |
| 15492 | cur = conn.cursor() |
| 15493 | cur.execute("INSERT INTO group_voice(gm_id, mime, stored_path, created_at) VALUES(?,?,?,?)", |
| 15494 | (gm_id, mime, "PENDING", now_z())) |
| 15495 | vid = cur.lastrowid |
| 15496 | |
| 15497 | stored_path = os.path.join(ATT_DIR, f"group_voice_{vid}.bin") |
| 15498 | try: |
| 15499 | size = _save_plain_upload(file_storage, stored_path) |
no outgoing calls
no test coverage detected