From f393752bbdc7c3e024e64c60a08dfe02591f04bc Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 21 Jan 2022 22:06:39 +0200 Subject: [PATCH] dfsfd --- files/helpers/images.py | 2 +- files/routes/comments.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/files/helpers/images.py b/files/helpers/images.py index f99485331..990c2872b 100644 --- a/files/helpers/images.py +++ b/files/helpers/images.py @@ -2,7 +2,7 @@ from PIL import Image as IImage, ImageSequence from webptools import gifwebp import time -def process_image(file=None, filename=None, resize=False): +def process_image(file=None, filename=None, resize=0): i = IImage.open(file) if not filename: filename = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp' diff --git a/files/routes/comments.py b/files/routes/comments.py index 28eeb1cb8..83704e734 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -460,10 +460,9 @@ def api_comment(v): if len(c.body) > 500: notifbody = c.body[:500] + '...' else: notifbody = c.body - if PUSHER_ID: - beams_client.publish_to_interests( - interests=[f'{request.host}{parent.author.id}'], - publish_body={ + beams_client.publish_to_interests( + interests=[f'{request.host}{parent.author.id}'], + publish_body={ 'web': { 'notification': { 'title': f'New reply by @{c.author_name}', @@ -481,8 +480,8 @@ def api_comment(v): 'url': f'/comment/{c.id}?context=9&read=true#context', } } - }, - ) + }, + ) vote = CommentVote(user_id=v.id, comment_id=c.id,