mirror of https://gitlab.com/bashrc2/epicyon
Check for published value
parent
85645fb5e7
commit
182c529047
7
inbox.py
7
inbox.py
|
@ -1387,6 +1387,13 @@ def validPostContent(messageJson: {},maxMentions: int,maxEmoji: int) -> bool:
|
|||
return True
|
||||
if not messageJson['object'].get('content'):
|
||||
return True
|
||||
|
||||
if not messageJson['object'].get('published'):
|
||||
return False
|
||||
if 'T' not in messageJson['object']['published']:
|
||||
return False
|
||||
if 'Z' not in messageJson['object']['published']:
|
||||
return False
|
||||
# check for bad html
|
||||
invalidStrings=['<script>','<canvas>','<style>','</html>','</body>','<br>','<hr>']
|
||||
for badStr in invalidStrings:
|
||||
|
|
|
@ -2444,6 +2444,8 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
|
|||
attachmentCtr+=1
|
||||
attachmentStr+='</div>'
|
||||
|
||||
publishedStr=''
|
||||
if postJsonObject['object'].get('published'):
|
||||
publishedStr=postJsonObject['object']['published']
|
||||
if '.' not in publishedStr:
|
||||
if '+' not in publishedStr:
|
||||
|
|
Loading…
Reference in New Issue