From 94e2be67ee8cf99565c95edce529e0d6bed56550 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 20 Sep 2021 17:05:11 +0100 Subject: [PATCH] Trace for signed json --- announce.py | 2 +- follow.py | 8 +++++--- inbox.py | 2 +- like.py | 2 +- posts.py | 11 ++++++----- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/announce.py b/announce.py index 128e70f5e..58d90ec66 100644 --- a/announce.py +++ b/announce.py @@ -181,7 +181,7 @@ def createAnnounce(session, baseDir: str, federationList: [], httpPrefix, True, clientToServer, federationList, sendThreads, postLog, cachedWebfingers, personCache, debug, projectVersion, None, groupAccount, - signingPrivateKeyPem) + signingPrivateKeyPem, 639633) return newAnnounce diff --git a/follow.py b/follow.py index 87519a6d9..ecf7e0e9e 100644 --- a/follow.py +++ b/follow.py @@ -898,7 +898,8 @@ def followedAccountAccepts(session, baseDir: str, httpPrefix: str, federationList, sendThreads, postLog, cachedWebfingers, personCache, debug, projectVersion, None, - groupAccount, signingPrivateKeyPem) + groupAccount, signingPrivateKeyPem, + 7856837) def followedAccountRejects(session, baseDir: str, httpPrefix: str, @@ -964,7 +965,8 @@ def followedAccountRejects(session, baseDir: str, httpPrefix: str, federationList, sendThreads, postLog, cachedWebfingers, personCache, debug, projectVersion, None, - groupAccount, signingPrivateKeyPem) + groupAccount, signingPrivateKeyPem, + 6393063) def sendFollowRequest(session, baseDir: str, @@ -1032,7 +1034,7 @@ def sendFollowRequest(session, baseDir: str, federationList, sendThreads, postLog, cachedWebfingers, personCache, debug, projectVersion, None, groupAccount, - signingPrivateKeyPem) + signingPrivateKeyPem, 8234389) return newFollowJson diff --git a/inbox.py b/inbox.py index f0323bcfa..da6806e16 100644 --- a/inbox.py +++ b/inbox.py @@ -2399,7 +2399,7 @@ def _bounceDM(senderPostId: str, session, httpPrefix: str, httpPrefix, False, False, federationList, sendThreads, postLog, cachedWebfingers, personCache, debug, __version__, None, groupAccount, - signingPrivateKeyPem) + signingPrivateKeyPem, 7238634) return True diff --git a/like.py b/like.py index 86055ddb4..edc85be6a 100644 --- a/like.py +++ b/like.py @@ -129,7 +129,7 @@ def _like(recentPostsCache: {}, httpPrefix, True, clientToServer, federationList, sendThreads, postLog, cachedWebfingers, personCache, debug, projectVersion, None, groupAccount, - signingPrivateKeyPem) + signingPrivateKeyPem, 7367374) return newLikeJson diff --git a/posts.py b/posts.py index 52405c5fa..0bb09fd23 100644 --- a/posts.py +++ b/posts.py @@ -2493,7 +2493,8 @@ def sendSignedJson(postJsonObject: {}, session, baseDir: str, sendThreads: [], postLog: [], cachedWebfingers: {}, personCache: {}, debug: bool, projectVersion: str, sharedItemsToken: str, groupAccount: bool, - signingPrivateKeyPem: str) -> int: + signingPrivateKeyPem: str, + sourceId: int) -> int: """Sends a signed json object to an inbox/outbox """ if debug: @@ -2559,7 +2560,7 @@ def sendSignedJson(postJsonObject: {}, session, baseDir: str, personCache, projectVersion, httpPrefix, nickname, domain, postToBox, - 30873) + sourceId) print("inboxUrl: " + str(inboxUrl)) print("toPersonId: " + str(toPersonId)) @@ -2879,7 +2880,7 @@ def sendToNamedAddresses(session, baseDir: str, sendThreads, postLog, cachedWebfingers, personCache, debug, projectVersion, sharedItemsToken, groupAccount, - signingPrivateKeyPem) + signingPrivateKeyPem, 34436782) def _hasSharedInbox(session, httpPrefix: str, domain: str, @@ -3052,7 +3053,7 @@ def sendToFollowers(session, baseDir: str, sendThreads, postLog, cachedWebfingers, personCache, debug, projectVersion, sharedItemsToken, groupAccount, - signingPrivateKeyPem) + signingPrivateKeyPem, 639342) else: # send to individual followers without using a shared inbox for handle in followerHandles: @@ -3081,7 +3082,7 @@ def sendToFollowers(session, baseDir: str, sendThreads, postLog, cachedWebfingers, personCache, debug, projectVersion, sharedItemsToken, groupAccount, - signingPrivateKeyPem) + signingPrivateKeyPem, 634219) time.sleep(4)