mirror of https://gitlab.com/bashrc2/epicyon
Don't allow alt-text descriptions of images to be too small
parent
d7125c1891
commit
565c6dac2d
6
utils.py
6
utils.py
|
@ -4504,6 +4504,12 @@ def disallow_announce(content: str, attachment: [], capabilities: {}) -> bool:
|
|||
if not item.get('name'):
|
||||
# no image description
|
||||
return True
|
||||
image_description = item['name']
|
||||
if not isinstance(image_description, str):
|
||||
continue
|
||||
if len(image_description) < 5:
|
||||
# not enough description
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue