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

Function current_scope

Scripts/ButSystem.py:1177–1187  ·  view source on GitHub ↗

Return a presence scope based on the host used to reach the app. This keeps 'online' accurate per generated link (local vs cloudflared vs tor), so users are only shown online if they're actually active on the same link.

()

Source from the content-addressed store, hash-verified

1175 """
1176 prefs = dict(DEFAULT_PREFS)
1177 if not username:
1178 return prefs
1179 try:
1180 conn = db_connect()
1181 row = conn.execute(
1182 "SELECT accent_key, font_key, ui_theme_key FROM user_prefs WHERE username=?",
1183 (username,),
1184 ).fetchone()
1185 conn.close()
1186 if row:
1187 ak = (row["accent_key"] or "").strip()
1188 fk = (row["font_key"] or "").strip()
1189 tk = (row["ui_theme_key"] or "").strip() if "ui_theme_key" in row.keys() else ""
1190 if ak in ACCENT_PRESETS:

Callers 8

loginFunction · 0.70
two_factorFunction · 0.70
group_chatFunction · 0.70
api_presenceFunction · 0.70
story_reactFunction · 0.70
story_mediaFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected