summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2020-01-30 13:19:16 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2020-01-30 13:25:15 +0100
commit4ececd6041133ea9745261b7a2ac0da1e8976e21 (patch)
treef16185a8e7970ec2f55afdd2bfe21d3d1ef7c4e3
parentdaee20c694000e1e85a98760773bcbbdc0709527 (diff)
downloadaur-4ececd6041133ea9745261b7a2ac0da1e8976e21.tar.gz
aur-4ececd6041133ea9745261b7a2ac0da1e8976e21.tar.xz
Keep signature delimiters intact in notifications
Since commit eeaa1c3 (Separate text from footer in notification emails, 2020-01-04), information about unsubscribing from notifications is added in a signature block. However, the code to format the email body trimmed the RFC 3676 signature delimiter, replacing "-- " by "--". Fix this by adding a special case for signature delimiters. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rwxr-xr-xaurweb/scripts/notify.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/aurweb/scripts/notify.py b/aurweb/scripts/notify.py
index 6c3be222..f2767fd8 100755
--- a/aurweb/scripts/notify.py
+++ b/aurweb/scripts/notify.py
@@ -54,6 +54,9 @@ class Notification:
def get_body_fmt(self, lang):
body = ''
for line in self.get_body(lang).splitlines():
+ if line == '-- ':
+ body += '-- \n'
+ continue
body += textwrap.fill(line, break_long_words=False) + '\n'
for i, ref in enumerate(self.get_refs()):
body += '\n' + '[%d] %s' % (i + 1, ref)