To field can be added for multiple activities

main
Bob Mottram 2021-03-20 12:06:34 +00:00
parent eada662691
commit d9bc4d72aa
1 changed files with 4 additions and 9 deletions

View File

@ -1260,15 +1260,10 @@ class PubServer(BaseHTTPRequestHandler):
originalMessageJson = messageJson.copy()
# For follow activities add a 'to' field, which is a copy
# of the object field
messageJson, toFieldExists = \
addToField('Follow', messageJson, self.server.debug)
# For like activities add a 'to' field, which is a copy of
# the actor within the object field
messageJson, toFieldExists = \
addToField('Like', messageJson, self.server.debug)
addToFieldTypes = ('Follow', 'Like', 'Add', 'Remove')
for addToType in addToFieldTypes:
messageJson, toFieldExists = \
addToField(addToType, messageJson, self.server.debug)
beginSaveTime = time.time()
# save the json for later queue processing