Use the correct json object

main
Bob Mottram 2020-05-02 13:45:49 +00:00
parent 17d95ea5f8
commit 71f8b95adf
1 changed files with 9 additions and 9 deletions

View File

@ -2049,18 +2049,18 @@ def inboxAfterCapabilities(recentPostsCache: {}, maxRecentPosts: int,
postJsonObject, maxMentions, maxEmoji): postJsonObject, maxMentions, maxEmoji):
# check for incoming git patches # check for incoming git patches
if isinstance(messageJson['object'], dict): if isinstance(postJsonObject['object'], dict):
if messageJson['object'].get('content') and \ if postJsonObject['object'].get('content') and \
messageJson['object'].get('summary'): postJsonObject['object'].get('summary'):
if receiveGitPatch(baseDir, nickname, domain, if receiveGitPatch(baseDir, nickname, domain,
messageJson['object']['summary'], postJsonObject['object']['summary'],
messageJson['object']['content']): postJsonObject['object']['content']):
gitPatchNotify(baseDir, handle, gitPatchNotify(baseDir, handle,
messageJson['object']['summary'], postJsonObject['object']['summary'],
messageJson['object']['content']) postJsonObject['object']['content'])
elif '[PATCH]' in messageJson['object']['content']: elif '[PATCH]' in postJsonObject['object']['content']:
print('WARN: git patch not accepted - ' + print('WARN: git patch not accepted - ' +
messageJson['object']['summary']) postJsonObject['object']['summary'])
return False return False
# replace YouTube links, so they get less tracking data # replace YouTube links, so they get less tracking data