dfsfd
This commit is contained in:
parent
6d49e8ef65
commit
f03bb79cae
2 changed files with 6 additions and 7 deletions
|
@ -2,7 +2,7 @@ from PIL import Image as IImage, ImageSequence
|
||||||
from webptools import gifwebp
|
from webptools import gifwebp
|
||||||
import time
|
import time
|
||||||
|
|
||||||
def process_image(file=None, filename=None, resize=False):
|
def process_image(file=None, filename=None, resize=0):
|
||||||
|
|
||||||
i = IImage.open(file)
|
i = IImage.open(file)
|
||||||
if not filename: filename = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
if not filename: filename = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
||||||
|
|
|
@ -460,10 +460,9 @@ def api_comment(v):
|
||||||
if len(c.body) > 500: notifbody = c.body[:500] + '...'
|
if len(c.body) > 500: notifbody = c.body[:500] + '...'
|
||||||
else: notifbody = c.body
|
else: notifbody = c.body
|
||||||
|
|
||||||
if PUSHER_ID:
|
beams_client.publish_to_interests(
|
||||||
beams_client.publish_to_interests(
|
interests=[f'{request.host}{parent.author.id}'],
|
||||||
interests=[f'{request.host}{parent.author.id}'],
|
publish_body={
|
||||||
publish_body={
|
|
||||||
'web': {
|
'web': {
|
||||||
'notification': {
|
'notification': {
|
||||||
'title': f'New reply by @{c.author_name}',
|
'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',
|
'url': f'/comment/{c.id}?context=9&read=true#context',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
vote = CommentVote(user_id=v.id,
|
vote = CommentVote(user_id=v.id,
|
||||||
comment_id=c.id,
|
comment_id=c.id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue