dfs
This commit is contained in:
parent
47f663ed9e
commit
a4cdf18ad3
16 changed files with 97 additions and 136 deletions
|
@ -63,6 +63,10 @@ def publish(pid, v):
|
|||
|
||||
cache.delete_memoized(frontlist)
|
||||
|
||||
for follow in v.followers:
|
||||
user = get_account(follow.user_id)
|
||||
send_notification(AUTOJANNY_ACCOUNT, user, f"@{v.username} has made a new post: [{post.title}](https://{site}{post.permalink})")
|
||||
|
||||
g.db.commit()
|
||||
|
||||
return {"message": "Post published!"}
|
||||
|
@ -616,10 +620,6 @@ def submit_post(v):
|
|||
if url.startswith("https://streamable.com/") and not url.startswith("https://streamable.com/e/"):
|
||||
url = url.replace("https://streamable.com/", "https://streamable.com/e/")
|
||||
|
||||
if "i.imgur.com" in url and "_d." not in url:
|
||||
url = url.replace(".png", "_d.png").replace(".jpg", "_d.jpg").replace(".jpeg", "_d.jpeg")
|
||||
if "_d." in url: url += "?maxwidth=9999"
|
||||
|
||||
repost = g.db.query(Submission).join(Submission.submission_aux).options(lazyload('*')).filter(
|
||||
SubmissionAux.url.ilike(url),
|
||||
Submission.deleted_utc == 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue