forked from indymedia/epicyon
Update events index
parent
3e8d2b3b38
commit
2881e06287
|
@ -179,6 +179,8 @@ def postMessageToOutbox(messageJson: {}, postToNickname: str,
|
||||||
if messageJson['object'].get('type'):
|
if messageJson['object'].get('type'):
|
||||||
if messageJson['object']['type'] == 'Article':
|
if messageJson['object']['type'] == 'Article':
|
||||||
outboxName = 'tlblogs'
|
outboxName = 'tlblogs'
|
||||||
|
elif messageJson['object']['type'] == 'Event':
|
||||||
|
outboxName = 'tlevent'
|
||||||
|
|
||||||
savedFilename = \
|
savedFilename = \
|
||||||
savePostToBox(baseDir,
|
savePostToBox(baseDir,
|
||||||
|
@ -195,12 +197,12 @@ def postMessageToOutbox(messageJson: {}, postToNickname: str,
|
||||||
messageJson['type'] == 'Patch' or \
|
messageJson['type'] == 'Patch' or \
|
||||||
messageJson['type'] == 'Announce':
|
messageJson['type'] == 'Announce':
|
||||||
indexes = [outboxName, "inbox"]
|
indexes = [outboxName, "inbox"]
|
||||||
for boxNameIndex in indexes:
|
|
||||||
if boxNameIndex == 'inbox' and outboxName == 'tlblogs':
|
|
||||||
continue
|
|
||||||
selfActor = \
|
selfActor = \
|
||||||
httpPrefix + '://' + domainFull + \
|
httpPrefix + '://' + domainFull + \
|
||||||
'/users/' + postToNickname
|
'/users/' + postToNickname
|
||||||
|
for boxNameIndex in indexes:
|
||||||
|
if boxNameIndex == 'inbox' and outboxName == 'tlblogs':
|
||||||
|
continue
|
||||||
# avoid duplicates of the message if already going
|
# avoid duplicates of the message if already going
|
||||||
# back to the inbox of the same account
|
# back to the inbox of the same account
|
||||||
if selfActor not in messageJson['to']:
|
if selfActor not in messageJson['to']:
|
||||||
|
|
Loading…
Reference in New Issue