online_sorted_users. Internal helper function. This docstring was added automatically to improve maintainability. Args: exclude: Parameter. scope: Parameter. Returns: Varies.
(exclude: Optional[str]=None, scope: Optional[str]=None)
| 1286 | This keeps 'online' accurate per generated link (local vs cloudflared vs tor), |
| 1287 | so users are only shown online if they're actually active on the same link. |
| 1288 | """ |
| 1289 | try: |
| 1290 | h = request.headers.get("X-Forwarded-Host") or request.host or "unknown" |
| 1291 | except Exception: |
| 1292 | h = "unknown" |
| 1293 | return (h or "unknown").lower() |
| 1294 | |
| 1295 | def mark_online(username: str, scope: str): |
| 1296 | """mark_online. |
| 1297 | |
| 1298 | Route handler or application helper. |
| 1299 | |
| 1300 | This docstring was expanded to make future maintenance easier. |
| 1301 | |
| 1302 | Args: |
| 1303 | username: Parameter. |
| 1304 | scope: Parameter. |
| 1305 | |
| 1306 | Returns: |
| 1307 | Varies. |
nothing calls this directly
no test coverage detected