Missing parameter

main
Bob Mottram 2020-05-03 13:12:52 +00:00
parent ddb9d4fd82
commit a08f6b273e
3 changed files with 4 additions and 2 deletions

4
git.py
View File

@ -155,12 +155,12 @@ def gitAddFromHandle(patchStr: str, handle: str) -> str:
def receiveGitPatch(baseDir: str, nickname: str, domain: str, def receiveGitPatch(baseDir: str, nickname: str, domain: str,
subject: str, content: str, messageType: str, subject: str, content: str,
fromNickname: str, fromDomain: str) -> bool: fromNickname: str, fromDomain: str) -> bool:
"""Receive a git patch """Receive a git patch
""" """
if not isGitPatch(baseDir, nickname, domain, if not isGitPatch(baseDir, nickname, domain,
subject, content): messageType, subject, content):
return False return False
patchStr = gitFormatContent(content) patchStr = gitFormatContent(content)

View File

@ -2062,6 +2062,7 @@ def inboxAfterCapabilities(recentPostsCache: {}, maxRecentPosts: int,
if fromPort != 80 and fromPort != 443: if fromPort != 80 and fromPort != 443:
fromDomain += ':' + str(fromPort) fromDomain += ':' + str(fromPort)
if receiveGitPatch(baseDir, nickname, domain, if receiveGitPatch(baseDir, nickname, domain,
postJsonObject['object']['type'],
postJsonObject['object']['summary'], postJsonObject['object']['summary'],
postJsonObject['object']['content'], postJsonObject['object']['content'],
fromNickname, fromDomain): fromNickname, fromDomain):

View File

@ -3935,6 +3935,7 @@ def individualPostAsHtml(recentPostsCache: {}, maxRecentPosts: int,
if not postJsonObject['object'].get('content'): if not postJsonObject['object'].get('content'):
return '' return ''
isPatch = isGitPatch(baseDir, nickname, domain, isPatch = isGitPatch(baseDir, nickname, domain,
postJsonObject['object']['type'],
postJsonObject['object']['summary'], postJsonObject['object']['summary'],
postJsonObject['object']['content']) postJsonObject['object']['content'])