Only use summary for quote if text is empty

For text messages, summary joins all lines into one, so multi-line quotes
look bad in Thunderbird.
This commit is contained in:
Alexander Krotov
2020-10-10 21:31:11 +03:00
committed by link2xt
parent bb50b9abe4
commit 69f159792e
2 changed files with 12 additions and 4 deletions

View File

@@ -479,7 +479,7 @@ class TestOfflineChat:
def test_quote(self, chat1):
"""Offline quoting test"""
msg = Message.new_empty(chat1.account, "text")
msg.set_text("message")
msg.set_text("Multi\nline\nmessage")
assert msg.quoted_text is None
# Prepare message to assign it a Message-Id.
@@ -489,7 +489,7 @@ class TestOfflineChat:
reply_msg = Message.new_empty(chat1.account, "text")
reply_msg.set_text("reply")
reply_msg.quote = msg
assert reply_msg.quoted_text == "message"
assert reply_msg.quoted_text == "Multi\nline\nmessage"
def test_group_chat_many_members_add_remove(self, ac1, lp):
lp.sec("ac1: creating group chat with 10 other members")