sfd
This commit is contained in:
parent
58f6753e77
commit
04d4442799
2 changed files with 4 additions and 3 deletions
|
@ -1,7 +1,6 @@
|
||||||
from files.helpers.const import SITE
|
from files.helpers.const import SITE
|
||||||
|
|
||||||
if SITE in ('pcmemes.net', 'localhost'):
|
if SITE in ('pcmemes.net', 'localhost'):
|
||||||
import time
|
|
||||||
from files.helpers.wrappers import auth_required
|
from files.helpers.wrappers import auth_required
|
||||||
from files.helpers.sanitize import sanitize
|
from files.helpers.sanitize import sanitize
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
@ -15,6 +14,9 @@ if SITE in ('pcmemes.net', 'localhost'):
|
||||||
online = []
|
online = []
|
||||||
messages = []
|
messages = []
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
socketio.run(app)
|
||||||
|
|
||||||
@app.get("/chat")
|
@app.get("/chat")
|
||||||
@auth_required
|
@auth_required
|
||||||
def chat( v):
|
def chat( v):
|
||||||
|
@ -33,7 +35,6 @@ if SITE in ('pcmemes.net', 'localhost'):
|
||||||
"username":v.username,
|
"username":v.username,
|
||||||
"namecolor":v.namecolor,
|
"namecolor":v.namecolor,
|
||||||
"text":sanitize(data),
|
"text":sanitize(data),
|
||||||
"time": time.strftime("%d %b %Y at %H:%M:%S", time.gmtime(int(time.time())))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
messages.append(data)
|
messages.append(data)
|
||||||
|
|
|
@ -718,7 +718,7 @@ def thumbnail_thread(pid):
|
||||||
|
|
||||||
for i in data:
|
for i in data:
|
||||||
|
|
||||||
if i["author"] == 'GoMarsey': continue
|
if i["subreddit"] == 'PokemonGoRaids': continue
|
||||||
|
|
||||||
body_html = sanitize(f'New {word} mention: https://old.reddit.com{i["permalink"]}?context=89', noimages=True)
|
body_html = sanitize(f'New {word} mention: https://old.reddit.com{i["permalink"]}?context=89', noimages=True)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue