forked from indymedia/epicyon
Send profile updates to individual inboxes
parent
897e35afb6
commit
a3cc8184bb
25
posts.py
25
posts.py
|
@ -1670,9 +1670,8 @@ def sendToFollowers(session,baseDir: str, \
|
|||
toPort=toDomain.split(':')[1]
|
||||
toDomain=toDomain.split(':')[0]
|
||||
|
||||
# If this is a profile update then send to shared inbox
|
||||
cc=''
|
||||
if withSharedInbox:
|
||||
if withSharedInbox and postJsonObject['type']!='Update':
|
||||
toNickname=followerHandles[index].split('@')[0]
|
||||
|
||||
# if there are more than one followers on the domain
|
||||
|
@ -1680,17 +1679,17 @@ def sendToFollowers(session,baseDir: str, \
|
|||
if len(followerHandles)>1:
|
||||
toNickname='inbox'
|
||||
|
||||
if toNickname!='inbox' and postJsonObject.get('type'):
|
||||
if postJsonObject['type']=='Update':
|
||||
if postJsonObject.get('object'):
|
||||
if isinstance(postJsonObject['object'], dict):
|
||||
if postJsonObject['object'].get('type'):
|
||||
if postJsonObject['object']['type']=='Person' or \
|
||||
postJsonObject['object']['type']=='Application' or \
|
||||
postJsonObject['object']['type']=='Group' or \
|
||||
postJsonObject['object']['type']=='Service':
|
||||
print('Sending profile update to shared inbox of '+toDomain)
|
||||
toNickname='inbox'
|
||||
#if toNickname!='inbox' and postJsonObject.get('type'):
|
||||
# if postJsonObject['type']=='Update':
|
||||
# if postJsonObject.get('object'):
|
||||
# if isinstance(postJsonObject['object'], dict):
|
||||
# if postJsonObject['object'].get('type'):
|
||||
# if postJsonObject['object']['type']=='Person' or \
|
||||
# postJsonObject['object']['type']=='Application' or \
|
||||
# postJsonObject['object']['type']=='Group' or \
|
||||
# postJsonObject['object']['type']=='Service':
|
||||
# print('Sending profile update to shared inbox of '+toDomain)
|
||||
# toNickname='inbox'
|
||||
|
||||
if debug:
|
||||
print('DEBUG: Sending from '+nickname+'@'+domain+' to '+toNickname+'@'+toDomain)
|
||||
|
|
Loading…
Reference in New Issue