mirror of https://gitlab.com/bashrc2/epicyon
Check that message fields exist
parent
a72a3e6d14
commit
78ff64dfc1
19
inbox.py
19
inbox.py
|
@ -2047,12 +2047,19 @@ def inboxAfterCapabilities(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
nickname = handle.split('@')[0]
|
nickname = handle.split('@')[0]
|
||||||
if validPostContent(baseDir, nickname, domain,
|
if validPostContent(baseDir, nickname, domain,
|
||||||
postJsonObject, maxMentions, maxEmoji):
|
postJsonObject, maxMentions, maxEmoji):
|
||||||
if receiveGitPatch(baseDir, nickname, domain,
|
if isinstance(messageJson['object'], dict):
|
||||||
messageJson['object']['summary'],
|
if messageJson['object'].get('content') and \
|
||||||
messageJson['object']['content']):
|
messageJson['object'].get('summary'):
|
||||||
gitPatchNotify(baseDir, handle,
|
if receiveGitPatch(baseDir, nickname, domain,
|
||||||
messageJson['object']['summary'],
|
messageJson['object']['summary'],
|
||||||
messageJson['object']['content'])
|
messageJson['object']['content']):
|
||||||
|
gitPatchNotify(baseDir, handle,
|
||||||
|
messageJson['object']['summary'],
|
||||||
|
messageJson['object']['content'])
|
||||||
|
elif '[PATCH]' in messageJson['object']['content']:
|
||||||
|
print('WARN: git patch not accepted - ' +
|
||||||
|
messageJson['object']['summary'])
|
||||||
|
return False
|
||||||
|
|
||||||
# replace YouTube links, so they get less tracking data
|
# replace YouTube links, so they get less tracking data
|
||||||
replaceYouTube(postJsonObject)
|
replaceYouTube(postJsonObject)
|
||||||
|
|
Loading…
Reference in New Issue