Only jsonld sign if a previous signature does not exist

main
Bob Mottram 2020-06-15 14:38:21 +01:00
parent bbb767ae45
commit 3766f6e9c1
1 changed files with 14 additions and 12 deletions

View File

@ -1419,6 +1419,7 @@ def sendPost(projectVersion: str,
return 7 return 7
postPath = inboxUrl.split(toDomain, 1)[1] postPath = inboxUrl.split(toDomain, 1)[1]
if not postJsonObject.get('signature'):
try: try:
signedPostJsonObject = jsonldSign(postJsonObject, privateKeyPem) signedPostJsonObject = jsonldSign(postJsonObject, privateKeyPem)
postJsonObject = signedPostJsonObject postJsonObject = signedPostJsonObject
@ -1749,6 +1750,7 @@ def sendSignedJson(postJsonObject: {}, session, baseDir: str,
addFollowersToPublicPost(postJsonObject) addFollowersToPublicPost(postJsonObject)
if not postJsonObject.get('signature'):
try: try:
signedPostJsonObject = jsonldSign(postJsonObject, privateKeyPem) signedPostJsonObject = jsonldSign(postJsonObject, privateKeyPem)
postJsonObject = signedPostJsonObject postJsonObject = signedPostJsonObject