From 0a2cf0e8b1a0d1f5852ef90ca00fb7a28bfebe83 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 2 May 2020 17:36:22 +0000 Subject: [PATCH] Save notification patch content at time of receiving --- git.py | 5 +++++ inbox.py | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/git.py b/git.py index e7384046d..2388a26a3 100644 --- a/git.py +++ b/git.py @@ -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 diff --git a/inbox.py b/inbox.py index 7817dbe53..d48456959 100644 --- a/inbox.py +++ b/inbox.py @@ -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?