embed
This commit is contained in:
parent
bbed8bd5e7
commit
054c3f7f34
1 changed files with 3 additions and 2 deletions
|
@ -855,6 +855,9 @@ def submit_post(v, sub=None):
|
||||||
elif v.bird:
|
elif v.bird:
|
||||||
if len(body) > 140 : return error("You have to type less than 140 characters!")
|
if len(body) > 140 : return error("You have to type less than 140 characters!")
|
||||||
|
|
||||||
|
|
||||||
|
embed = None
|
||||||
|
|
||||||
if url:
|
if url:
|
||||||
if "/i.imgur.com/" in url: url = url.replace(".png", ".webp").replace(".jpg", ".webp").replace(".jpeg", ".webp")
|
if "/i.imgur.com/" in url: url = url.replace(".png", ".webp").replace(".jpg", ".webp").replace(".jpeg", ".webp")
|
||||||
elif "/media.giphy.com/" in url or "/c.tenor.com/" in url: url = url.replace(".gif", ".webp")
|
elif "/media.giphy.com/" in url or "/c.tenor.com/" in url: url = url.replace(".gif", ".webp")
|
||||||
|
@ -902,8 +905,6 @@ def submit_post(v, sub=None):
|
||||||
domain_obj = get_domain(domain)
|
domain_obj = get_domain(domain)
|
||||||
if not domain_obj: domain_obj = get_domain(domain+parsed_url.path)
|
if not domain_obj: domain_obj = get_domain(domain+parsed_url.path)
|
||||||
|
|
||||||
embed = None
|
|
||||||
|
|
||||||
if domain_obj:
|
if domain_obj:
|
||||||
reason = f"Remove the {domain_obj.domain} link from your post and try again. {domain_obj.reason}"
|
reason = f"Remove the {domain_obj.domain} link from your post and try again. {domain_obj.reason}"
|
||||||
return error(reason)
|
return error(reason)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue