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

Function story_upload

Scripts/ButSystem.py:18835–18858  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18833 out = []
18834 for r in rows:
18835 msg = _discussion_build_message_dict(conn, dict(r), me)
18836 html_row = _render_discussion_row_html(msg, me)
18837 out.append({"id": int(msg["id"]), "sender": msg["sender"], "html": html_row})
18838 finally:
18839 conn.close()
18840
18841 return jsonify({"ok": True, "messages": out})
18842
18843@app.route("/api/presence")
18844@login_required
18845def api_presence():
18846 me = current_user()
18847 scope = current_scope()
18848 try:
18849 online = online_usernames(scope)
18850 except Exception:
18851 online = set()
18852 conn = db_connect()
18853 rows = conn.execute("SELECT username FROM users WHERE username<>?", (me,)).fetchall()
18854 conn.close()
18855 items = {r["username"]: (r["username"] in online) for r in rows}
18856 return jsonify({"ok": True, "items": items, "server_now": now_z()})
18857
18858
18859TEMPLATES["reports.html"] = r"""
18860{% extends "base.html" %}
18861{% block content %}

Callers

nothing calls this directly

Calls 3

_stories_tables_initFunction · 0.70
current_userFunction · 0.70
_story_store_uploadFunction · 0.70

Tested by

no test coverage detected