Only check for reply markers at the beginning of each line
Otherwise we could cut the user's message if they use the ">" symbol in their text. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
5cb66f7a7f
commit
a0644d225c
|
@ -52,7 +52,7 @@ thread_id = match.group(0).rsplit("=")[-1].rstrip()
|
|||
# - Quoted text will always begin with ">"
|
||||
# - The email reply will always have "Reply sent on <whenever>" text
|
||||
#
|
||||
message = re.sub(">(.*?)\n", "", payload).rstrip()
|
||||
message = re.sub("^>(.*?)\n", "", payload, flags=re.MULTILINE).rstrip()
|
||||
split = message.split("\n")
|
||||
message = "\n".join(split[:-1]).rstrip()
|
||||
|
||||
|
|
Loading…
Reference in New Issue