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

Function _story_user_cards

Scripts/ButSystem.py:18634–18665  ·  view source on GitHub ↗
(scope: str, q: str = "")

Source from the content-addressed store, hash-verified

18632 conn.close()
18633
18634 class Obj:
18635 def __init__(self, d):
18636 self.__dict__.update(d)
18637
18638 return render_template(
18639 "discussion.html",
18640 title="Discussion",
18641 items=[Obj(x) for x in items],
18642 q=q_raw,
18643 me=me,
18644 )
18645
18646
18647@app.route("/discussion/send", methods=["POST"])
18648@login_required
18649def discussion_send():
18650 """Send a discussion message (text, file, GIF, and/or voice)."""
18651 _feature_tables_init()
18652 me = current_user()
18653
18654 is_ajax = (
18655 request.headers.get("X-Requested-With") == "XMLHttpRequest"
18656 or "application/json" in (request.headers.get("Accept", ""))
18657 )
18658
18659 body = (request.form.get("body") or "").strip()
18660 voice = request.files.get("voice")
18661 upfile = request.files.get("file")
18662 gif = request.files.get("gif")
18663 gif_url = (request.form.get("gif_url") or "").strip()
18664
18665 # Size limits (33MB) for chat stability.
18666 if voice and getattr(voice, "filename", ""):
18667 vsz = _filestorage_size(voice)
18668 if vsz is not None and vsz > CHAT_MAX_BYTES:

Callers 1

storiesFunction · 0.70

Calls 5

_stories_tables_initFunction · 0.70
_story_cutoff_zFunction · 0.70
db_connectFunction · 0.70
user_cardsFunction · 0.70
_local_time_strFunction · 0.70

Tested by

no test coverage detected