EncryptedMessage type

main
Bob Mottram 2020-08-05 13:24:09 +01:00
parent 0f075f37e9
commit 021ce1355c
2 changed files with 3 additions and 0 deletions

View File

@ -189,6 +189,7 @@ def postMessageToOutbox(messageJson: {}, postToNickname: str,
if messageJson['type'] == 'Create' or \ if messageJson['type'] == 'Create' or \
messageJson['type'] == 'Question' or \ messageJson['type'] == 'Question' or \
messageJson['type'] == 'Note' or \ messageJson['type'] == 'Note' or \
messageJson['type'] == 'EncryptedMessage' or \
messageJson['type'] == 'Article' or \ messageJson['type'] == 'Article' or \
messageJson['type'] == 'Patch' or \ messageJson['type'] == 'Patch' or \
messageJson['type'] == 'Announce': messageJson['type'] == 'Announce':

View File

@ -2467,6 +2467,7 @@ def isReply(postJsonObject: {}, actor: str) -> bool:
if postJsonObject['object'].get('moderationStatus'): if postJsonObject['object'].get('moderationStatus'):
return False return False
if postJsonObject['object']['type'] != 'Note' and \ if postJsonObject['object']['type'] != 'Note' and \
postJsonObject['object']['type'] != 'EncryptedMessage' and \
postJsonObject['object']['type'] != 'Article': postJsonObject['object']['type'] != 'Article':
return False return False
if postJsonObject['object'].get('inReplyTo'): if postJsonObject['object'].get('inReplyTo'):
@ -2578,6 +2579,7 @@ def addPostStringToTimeline(postStr: str, boxname: str,
""" """
# must be a recognized ActivityPub type # must be a recognized ActivityPub type
if ('"Note"' in postStr or if ('"Note"' in postStr or
'"EncryptedMessage"' in postStr or
'"Article"' in postStr or '"Article"' in postStr or
'"Patch"' in postStr or '"Patch"' in postStr or
'"Announce"' in postStr or '"Announce"' in postStr or