Save notification patch content at time of receiving

main
Bob Mottram 2020-05-02 17:36:22 +00:00
parent 6a4d947d18
commit 0a2cf0e8b1
2 changed files with 5 additions and 4 deletions

5
git.py
View File

@ -117,5 +117,10 @@ def receiveGitPatch(baseDir: str, nickname: str, domain: str,
return False
with open(patchFilename, "w") as patchFile:
patchFile.write(contentStr)
patchNotifyFilename = \
baseDir + '/accounts/' + \
nickname + '@' + domain + '/.newPatchContent'
with open(patchNotifyFilename, "w") as patchFile:
patchFile.write(contentStr)
return True
return False

View File

@ -60,7 +60,6 @@ from question import questionUpdateVotes
from media import replaceYouTube
from git import isGitPatch
from git import receiveGitPatch
from git import gitFormatContent
def storeHashTags(baseDir: str, nickname: str, postJsonObject: {}) -> None:
@ -1710,9 +1709,6 @@ def gitPatchNotify(baseDir: str, handle: str,
with open(patchFile, 'w') as fp:
fp.write(subject)
with open(patchFile + 'Content', 'w') as fp:
fp.write(gitFormatContent(content))
def groupHandle(baseDir: str, handle: str) -> bool:
"""Is the given account handle a group?