forked from indymedia/epicyon
Support Article activity type
parent
3af8d99ca5
commit
3302fdfa6c
|
@ -165,6 +165,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']=='Article' or \
|
||||||
messageJson['type']=='Announce':
|
messageJson['type']=='Announce':
|
||||||
inboxUpdateIndex('outbox',baseDir, \
|
inboxUpdateIndex('outbox',baseDir, \
|
||||||
postToNickname+'@'+domain, \
|
postToNickname+'@'+domain, \
|
||||||
|
|
14
posts.py
14
posts.py
|
@ -2023,7 +2023,8 @@ def isDM(postJsonObject: {}) -> bool:
|
||||||
return False
|
return False
|
||||||
if not isinstance(postJsonObject['object'], dict):
|
if not isinstance(postJsonObject['object'], dict):
|
||||||
return False
|
return False
|
||||||
if postJsonObject['object']['type']!='Note':
|
if postJsonObject['object']['type']!='Note' and \
|
||||||
|
postJsonObject['object']['type']!='Article':
|
||||||
return False
|
return False
|
||||||
if postJsonObject['object'].get('moderationStatus'):
|
if postJsonObject['object'].get('moderationStatus'):
|
||||||
return False
|
return False
|
||||||
|
@ -2056,7 +2057,8 @@ def isImageMedia(session,baseDir: str,httpPrefix: str, \
|
||||||
return False
|
return False
|
||||||
if postJsonObject['object'].get('moderationStatus'):
|
if postJsonObject['object'].get('moderationStatus'):
|
||||||
return False
|
return False
|
||||||
if postJsonObject['object']['type']!='Note':
|
if postJsonObject['object']['type']!='Note' and \
|
||||||
|
postJsonObject['object']['type']!='Article':
|
||||||
return False
|
return False
|
||||||
if not postJsonObject['object'].get('attachment'):
|
if not postJsonObject['object'].get('attachment'):
|
||||||
return False
|
return False
|
||||||
|
@ -2081,7 +2083,8 @@ def isReply(postJsonObject: {},actor: str) -> bool:
|
||||||
return False
|
return False
|
||||||
if postJsonObject['object'].get('moderationStatus'):
|
if postJsonObject['object'].get('moderationStatus'):
|
||||||
return False
|
return False
|
||||||
if postJsonObject['object']['type']!='Note':
|
if postJsonObject['object']['type']!='Note' and \
|
||||||
|
postJsonObject['object']['type']!='Article':
|
||||||
return False
|
return False
|
||||||
if postJsonObject['object'].get('inReplyTo'):
|
if postJsonObject['object'].get('inReplyTo'):
|
||||||
if postJsonObject['object']['inReplyTo'].startswith(actor):
|
if postJsonObject['object']['inReplyTo'].startswith(actor):
|
||||||
|
@ -2188,7 +2191,7 @@ def addPostStringToTimeline(postStr: str,boxname: str, \
|
||||||
""" is this a valid timeline post?
|
""" is this a valid timeline post?
|
||||||
"""
|
"""
|
||||||
# must be a "Note" or "Announce" type
|
# must be a "Note" or "Announce" type
|
||||||
if '"Note"' in postStr or '"Announce"' in postStr or \
|
if '"Note"' in postStr '"Article"' in postStr or '"Announce"' in postStr or \
|
||||||
('"Question"' in postStr and ('"Create"' in postStr or '"Update"' in postStr)):
|
('"Question"' in postStr and ('"Create"' in postStr or '"Update"' in postStr)):
|
||||||
|
|
||||||
if boxname=='dm':
|
if boxname=='dm':
|
||||||
|
@ -2718,7 +2721,8 @@ def downloadAnnounce(session,baseDir: str,httpPrefix: str, \
|
||||||
rejectAnnounce(announceFilename)
|
rejectAnnounce(announceFilename)
|
||||||
#pprint(announcedJson)
|
#pprint(announcedJson)
|
||||||
return None
|
return None
|
||||||
if announcedJson['type']!='Note':
|
if announcedJson['type']!='Note' and \
|
||||||
|
announcedJson['type']!='Article':
|
||||||
rejectAnnounce(announceFilename)
|
rejectAnnounce(announceFilename)
|
||||||
#pprint(announcedJson)
|
#pprint(announcedJson)
|
||||||
return None
|
return None
|
||||||
|
|
Loading…
Reference in New Issue