MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / face_detector_bounty_preview

Function face_detector_bounty_preview

Scripts/ButSystem.py:15734–15757  ·  view source on GitHub ↗
(eid: int)

Source from the content-addressed store, hash-verified

15732 v = conn.execute("SELECT id, mime FROM group_voice WHERE gm_id=? ORDER BY id DESC LIMIT 1", (r["id"],)).fetchone()
15733 has_voice = bool(v)
15734 try:
15735 body = aesgcm_decrypt_text(r["body_enc"])
15736 except Exception:
15737 body = "[decrypt failed]"
15738 messages.append({
15739 "id": r["id"],
15740 "sender": r["sender"],
15741 "kind": "voice" if has_voice else "text",
15742 "body": body if not has_voice else "",
15743 "created_at_local": _local_time_str(r["created_at"]),
15744 "created_at_utc": r["created_at"],
15745 "voice_id": v["id"] if v else None,
15746 "voice_mime": v["mime"] if v else "audio/webm"
15747 })
15748
15749 conn.close()
15750
15751 return render_template("group_chat.html", title="Group chat",
15752 g=Obj(g_row), my_role=role, members=[type("M", (), m)() for m in members],
15753 all_users=all_usernames(), me=me, messages=messages, has_group_pin=has_group_pin)
15754
15755@app.route("/groups/<int:gid>/send", methods=["POST"])
15756@login_required
15757def group_send(gid: int):
15758 """Send a group message (text and/or voice) without forcing a page refresh when called via AJAX.
15759
15760 Stability:

Callers

nothing calls this directly

Calls 4

require_adminFunction · 0.70
is_encrypted_fileFunction · 0.70
aesgcm_decrypt_generatorFunction · 0.70

Tested by

no test coverage detected