main
Bob Mottram 2020-08-24 15:17:16 +01:00
parent 01ecf7d1a3
commit 9c7895e43a
2 changed files with 8 additions and 0 deletions

View File

@ -789,16 +789,23 @@ def isEventPost(messageJson: {}) -> bool:
return False
if messageJson['object']['type'] != 'Event':
return False
print('Event arriving')
if not messageJson['object'].get('startTime'):
print('No event start time')
return False
if not messageJson['object'].get('actor'):
print('No event actor')
return False
if not messageJson['object'].get('content'):
print('No event content')
return False
if not messageJson['object'].get('name'):
print('No event name')
return False
if not messageJson['object'].get('uuid'):
print('No event UUID')
return False
print('Event detected')
return True

View File

@ -613,6 +613,7 @@ def validNickname(domain: str, nickname: str) -> bool:
'public', 'followers',
'channel', 'capabilities', 'calendar',
'tlreplies', 'tlmedia', 'tlblogs',
'tlevents',
'moderation', 'activity', 'undo',
'reply', 'replies', 'question', 'like',
'likes', 'users', 'statuses',