Fix #238: remove "Get Them Help" button.
This commit is contained in:
parent
2077ac4f83
commit
ecbd8179b9
2 changed files with 0 additions and 15 deletions
|
@ -353,18 +353,6 @@ def downvoting(v, username):
|
|||
return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Down', name2=f'Who @{username} downvotes')
|
||||
|
||||
|
||||
|
||||
@app.post("/@<username>/suicide")
|
||||
@limiter.limit("1/second;5/day")
|
||||
@auth_required
|
||||
def suicide(v, username):
|
||||
user = get_user(username)
|
||||
suicide = f"Hi there,\n\nA [concerned user](/id/{v.id}) reached out to us about you.\n\nWhen you're in the middle of something painful, it may feel like you don't have a lot of options. But whatever you're going through, you deserve help and there are people who are here for you.\n\nThere are resources available in your area that are free, confidential, and available 24/7:\n\n- Call, Text, or Chat with Canada's [Crisis Services Canada](https://www.crisisservicescanada.ca/en/)\n- Call, Email, or Visit the UK's [Samaritans](https://www.samaritans.org/)\n- Text CHAT to America's [Crisis Text Line](https://www.crisistextline.org/) at 741741.\nIf you don't see a resource in your area above, the moderators keep a comprehensive list of resources and hotlines for people organized by location. Find Someone Now\n\nIf you think you may be depressed or struggling in another way, don't ignore it or brush it aside. Take yourself and your feelings seriously, and reach out to someone.\n\nIt may not feel like it, but you have options. There are people available to listen to you, and ways to move forward.\n\nYour fellow users care about you and there are people who want to help."
|
||||
send_notification(user.id, suicide)
|
||||
g.db.commit()
|
||||
return {"message": "Help message sent!"}
|
||||
|
||||
|
||||
@app.get("/@<username>/coins")
|
||||
@auth_required
|
||||
def get_coins(v, username):
|
||||
|
|
|
@ -165,8 +165,6 @@
|
|||
<a id="button-sub" class="btn btn-primary {% if is_following or u.is_nofollow or u.is_blocked %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/follow/{{u.username}}','button-unsub','button-sub')">Follow</a>
|
||||
<a class="btn btn-primary" role="button" onclick="toggleElement('message', 'input-message')">Message</a>
|
||||
|
||||
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/@{{u.username}}/suicide')">Get them help</a>
|
||||
|
||||
{% if v and v.admin_level > 2 %}
|
||||
<a id="admin" class="{% if u.admin_level > 1 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2(this,'/@{{u.username}}/make_admin','admin','unadmin')">Make admin</a>
|
||||
|
||||
|
@ -440,7 +438,6 @@
|
|||
|
||||
<a id="button-sub2" class="btn btn-primary {% if is_following or u.is_nofollow or u.is_blocked %}d-none{% endif %}" role="button" onclick="post_toast2(this,'/follow/{{u.username}}','button-unsub2','button-sub2')">Follow</a>
|
||||
<a class="btn btn-primary" role="button" onclick="toggleElement('message-mobile', 'input-message-mobile')">Message</a>
|
||||
<a class="btn btn-primary" role="button" onclick="post_toast(this,'/@{{u.username}}/suicide')">Get them help</a>
|
||||
|
||||
{% if v and v.admin_level > 2 %}
|
||||
<a id="admin2" class="{% if u.admin_level > 1 %}d-none{% endif %} btn btn-primary" href="javascript:void(0)" onclick="post_toast2(this,'/@{{u.username}}/make_admin','admin2','unadmin2')">Make admin</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue