dsf
This commit is contained in:
parent
eea807bf88
commit
99a5732e5e
832 changed files with 27 additions and 27 deletions
|
@ -18,8 +18,8 @@ def api_flag_post(pid, v):
|
|||
if "<" in reason: return {"error": f"Reasons can't contain <"}
|
||||
|
||||
for i in re.finditer(':(.{1,30}?):', reason):
|
||||
if path.isfile(f'./files/assets/images/emojis2/{i.group(1)}.webp'):
|
||||
reason = reason.replace(f':{i.group(1)}:', f'<img loading="lazy" data-bs-toggle="tooltip" title="{i.group(1)}" delay="0" height=20 src="https://{site}/assets/images/emojis2/{i.group(1)}.webp">')
|
||||
if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.webp'):
|
||||
reason = reason.replace(f':{i.group(1)}:', f'<img loading="lazy" data-bs-toggle="tooltip" title="{i.group(1)}" delay="0" height=20 src="https://{site}/assets/images/emojis/{i.group(1)}.webp">')
|
||||
|
||||
flag = Flag(post_id=post.id,
|
||||
user_id=v.id,
|
||||
|
@ -49,8 +49,8 @@ def api_flag_comment(cid, v):
|
|||
if "<" in reason: return {"error": f"Reasons can't contain <"}
|
||||
|
||||
for i in re.finditer(':(.{1,30}?):', reason):
|
||||
if path.isfile(f'./files/assets/images/emojis2/{i.group(1)}.webp'):
|
||||
reason = reason.replace(f':{i.group(1)}:', f'<img loading="lazy" data-bs-toggle="tooltip" title="{i.group(1)}" delay="0" height=20 src="https://{site}/assets/images/emojis2/{i.group(1)}.webp">')
|
||||
if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.webp'):
|
||||
reason = reason.replace(f':{i.group(1)}:', f'<img loading="lazy" data-bs-toggle="tooltip" title="{i.group(1)}" delay="0" height=20 src="https://{site}/assets/images/emojis/{i.group(1)}.webp">')
|
||||
|
||||
flag = CommentFlag(comment_id=comment.id,
|
||||
user_id=v.id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue