forked from indymedia/epicyon
Also handle bot profiles
parent
ab64f2a2c5
commit
2af276f0ae
3
inbox.py
3
inbox.py
|
@ -658,7 +658,8 @@ def receiveUpdate(session,baseDir: str, \
|
|||
print('DEBUG: "users" missing from actor in '+messageJson['type'])
|
||||
return False
|
||||
|
||||
if messageJson['object']['type']=='Person':
|
||||
if messageJson['object']['type']=='Person' or \
|
||||
messageJson['object']['type']=='Service':
|
||||
if messageJson['object'].get('url') and messageJson['object'].get('id'):
|
||||
print('Request to update actor: '+messageJson['actor'])
|
||||
updateDomain,updatePort=getDomainFromActor(messageJson['actor'])
|
||||
|
|
7
posts.py
7
posts.py
|
@ -1328,7 +1328,9 @@ def sendToNamedAddresses(session,baseDir: str, \
|
|||
isProfileUpdate=False
|
||||
# for actor updates there is no 'to' within the object
|
||||
if postJsonObject['object'].get('type') and postJsonObject.get('type'):
|
||||
if postJsonObject['type']=='Update' and postJsonObject['object']['type']=='Person':
|
||||
if postJsonObject['type']=='Update' and \
|
||||
(postJsonObject['object']['type']=='Person' or \
|
||||
postJsonObject['object']['type']=='Service'):
|
||||
# use the original object, which has a 'to'
|
||||
recipientsObject=postJsonObject
|
||||
isProfileUpdate=True
|
||||
|
@ -1473,7 +1475,8 @@ def sendToFollowers(session,baseDir: str, \
|
|||
if postJsonObject.get('object'):
|
||||
if isinstance(postJsonObject['object'], dict):
|
||||
if postJsonObject['object'].get('type'):
|
||||
if postJsonObject['object']['type']=='Person':
|
||||
if postJsonObject['object']['type']=='Person' or \
|
||||
postJsonObject['object']['type']=='Service':
|
||||
print('Sending profile update to shared inbox of '+toDomain)
|
||||
toNickname='inbox'
|
||||
|
||||
|
|
Loading…
Reference in New Issue