fdfd
This commit is contained in:
parent
5bf3382158
commit
1a2a2643f7
8 changed files with 21 additions and 21 deletions
|
@ -18,7 +18,7 @@ from drama.__main__ import app, limiter, cache
|
|||
from PIL import Image as PILimage
|
||||
from .front import frontlist
|
||||
|
||||
domain = environ.get("domain").strip()
|
||||
site = environ.get("domain").strip()
|
||||
|
||||
with open("snappy.txt", "r") as f: snappyquotes = f.read().split("{[para]}")
|
||||
|
||||
|
@ -334,7 +334,7 @@ def edit_post(pid, v):
|
|||
user = g.db.query(User).filter_by(username=username).first()
|
||||
if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user)
|
||||
|
||||
for x in notify_users: send_notification(1046, x, f"@{v.username} has mentioned you: https://{domain}{p.permalink}")
|
||||
for x in notify_users: send_notification(1046, x, f"@{v.username} has mentioned you: https://{site}{p.permalink}")
|
||||
|
||||
return redirect(p.permalink)
|
||||
|
||||
|
@ -847,12 +847,12 @@ def submit_post(v):
|
|||
user = g.db.query(User).filter_by(username=username).first()
|
||||
if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user)
|
||||
|
||||
for x in notify_users: send_notification(1046, x, f"@{v.username} has mentioned you: https://{domain}{new_post.permalink}")
|
||||
for x in notify_users: send_notification(1046, x, f"@{v.username} has mentioned you: https://{site}{new_post.permalink}")
|
||||
|
||||
if not new_post.private:
|
||||
for follow in v.followers:
|
||||
user = get_account(follow.user_id)
|
||||
send_notification(2360, user, f"@{v.username} has made a new post: [{title}](https://{domain}{new_post.permalink})")
|
||||
send_notification(2360, user, f"@{v.username} has made a new post: [{title}](https://{site}{new_post.permalink})")
|
||||
|
||||
g.db.add(new_post)
|
||||
g.db.commit()
|
||||
|
@ -927,7 +927,7 @@ def submit_post(v):
|
|||
n = Notification(comment_id=c.id, user_id=v.id)
|
||||
g.db.add(n)
|
||||
g.db.commit()
|
||||
send_message(f"https://{domain}{new_post.permalink}")
|
||||
send_message(f"https://{site}{new_post.permalink}")
|
||||
|
||||
v.post_count = v.submissions.filter_by(is_banned=False, deleted_utc=0).count()
|
||||
g.db.add(v)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue