mirror of https://gitlab.com/bashrc2/epicyon
Changing existing attachments
parent
7a91b9b71a
commit
a0b20fbf64
14
outbox.py
14
outbox.py
|
@ -132,7 +132,14 @@ def _outboxPersonReceiveUpdate(recentPostsCache: {},
|
||||||
if propertyValue != 'PropertyValue':
|
if propertyValue != 'PropertyValue':
|
||||||
ctr += 1
|
ctr += 1
|
||||||
continue
|
continue
|
||||||
if propertyValue['name'] == newPropertyValue['name']:
|
if propertyValue['name'] != newPropertyValue['name']:
|
||||||
|
ctr += 1
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
if propertyValue['value'] != newPropertyValue['value']:
|
||||||
|
actorJson['attachment'][ctr]['value'] = \
|
||||||
|
newPropertyValue['value']
|
||||||
|
actorChanged = True
|
||||||
found = True
|
found = True
|
||||||
break
|
break
|
||||||
ctr += 1
|
ctr += 1
|
||||||
|
@ -142,10 +149,7 @@ def _outboxPersonReceiveUpdate(recentPostsCache: {},
|
||||||
"type": "PropertyValue",
|
"type": "PropertyValue",
|
||||||
"value": newPropertyValue['value']
|
"value": newPropertyValue['value']
|
||||||
})
|
})
|
||||||
else:
|
actorChanged = True
|
||||||
actorJson['attachment'][ctr]['value'] = \
|
|
||||||
newPropertyValue['value']
|
|
||||||
actorChanged = True
|
|
||||||
# save actor to file
|
# save actor to file
|
||||||
if actorChanged:
|
if actorChanged:
|
||||||
saveJson(actorJson, actorFilename)
|
saveJson(actorJson, actorFilename)
|
||||||
|
|
Loading…
Reference in New Issue