vcvc
This commit is contained in:
parent
cb4386b9b8
commit
1e83371849
19 changed files with 42 additions and 42 deletions
|
@ -78,7 +78,7 @@ def publish(pid, v):
|
|||
cache.delete_memoized(User.userpagelisting)
|
||||
|
||||
if v.admin_level > 0 and ("[changelog]" in post.title.lower() or "(changelog)" in post.title.lower()):
|
||||
send_discord_message(f"{request.host_url}{post.permalink[1:]}")
|
||||
send_discord_message(f"{SITE_FULL}{post.permalink}")
|
||||
cache.delete_memoized(changeloglist)
|
||||
|
||||
g.db.commit()
|
||||
|
@ -557,7 +557,7 @@ def thumbnail_thread(pid):
|
|||
|
||||
fetch_url = post.url
|
||||
|
||||
if fetch_url.startswith('/'): fetch_url = f"{request.host_url}{fetch_url[1:]}"
|
||||
if fetch_url.startswith('/'): fetch_url = f"{SITE_FULL}{fetch_url}"
|
||||
|
||||
headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"}
|
||||
|
||||
|
@ -1023,7 +1023,7 @@ def submit_post(v):
|
|||
rev = f"* [unddit.com](https://unddit.com/{rev})\n"
|
||||
else: rev = ''
|
||||
newposturl = new_post.url
|
||||
if newposturl.startswith('/'): newposturl = f"{request.host_url}{newposturl[1:]}"
|
||||
if newposturl.startswith('/'): newposturl = f"{SITE_FULL}{newposturl}"
|
||||
body += f"Snapshots:\n\n{rev}* [archive.org](https://web.archive.org/{newposturl})\n* [archive.ph](https://archive.ph/?url={quote(newposturl)}&run=1) (click to archive)\n\n"
|
||||
gevent.spawn(archiveorg, newposturl)
|
||||
|
||||
|
@ -1076,7 +1076,7 @@ def submit_post(v):
|
|||
cache.delete_memoized(frontlist)
|
||||
cache.delete_memoized(User.userpagelisting)
|
||||
if v.admin_level > 0 and ("[changelog]" in new_post.title.lower() or "(changelog)" in new_post.title.lower()) and not new_post.private:
|
||||
send_discord_message(f"{request.host_url}{new_post.permalink[1:]}")
|
||||
send_discord_message(f"{SITE_FULL}{new_post.permalink}")
|
||||
cache.delete_memoized(changeloglist)
|
||||
|
||||
if v.id in (PIZZASHILL_ID, HIL_ID):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue