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

Function api_call_peek

Scripts/ButSystem.py:14068–14083  ·  view source on GitHub ↗

If there is an active call between me and peer, return call_id (used to start polling).

(peer: str)

Source from the content-addressed store, hash-verified

14066This docstring was expanded to make future maintenance easier.
14067
14068Args:
14069 username: Parameter.
14070
14071Returns:
14072 Varies.
14073"""
14074 me = current_user()
14075 username = username.strip()
14076 peer_display = username
14077 is_self_chat = (username == me)
14078 if is_self_chat:
14079 peer_display = "Saved messages"
14080
14081 conn = db_connect()
14082 exists = conn.execute("SELECT 1 FROM users WHERE username=?", (username,)).fetchone()
14083 if not exists:
14084 conn.close()
14085 flash("User not found.")
14086 return redirect(url_for("chats"))

Callers

nothing calls this directly

Calls 2

current_userFunction · 0.70
db_connectFunction · 0.70

Tested by

no test coverage detected