Remove a bounty from a profiler entry (admin only).
()
| 15869 | |
| 15870 | |
| 15871 | @app.route("/groups/<int:gid>/poll") |
| 15872 | @login_required |
| 15873 | def group_poll(gid: int): |
| 15874 | """Return new group messages after a given message id (AJAX polling).""" |
| 15875 | me = current_user() |
| 15876 | role = group_role(gid, me) |
| 15877 | if not _chat_lock_is_unlocked(me, "group", gid): |
| 15878 | return jsonify(ok=False, locked=True, error="PIN required"), 423 |
| 15879 | if not role: |
| 15880 | abort(403) |
| 15881 | |
| 15882 | after = request.args.get("after", "0").strip() |
| 15883 | try: |
| 15884 | after_id = int(after) |
| 15885 | except Exception: |
| 15886 | after_id = 0 |
| 15887 | |
| 15888 | conn = db_connect() |
| 15889 | try: |
| 15890 | rows = conn.execute( |
| 15891 | """ |
| 15892 | SELECT id, sender, body_enc, created_at |
| 15893 | FROM group_messages |
| 15894 | WHERE group_id=? AND id>? |
| 15895 | ORDER BY id ASC |
| 15896 | LIMIT 80 |
nothing calls this directly
no test coverage detected