email_mirror: Add prefer-html and prefer-text address options.

Closes #13484.

These options tell zulip whether to prefer the plaintext or html version
of the email message. prefer-text is the default behavior, so including
the option doesn't change anything as of now, but we're adding it to
prepare to potentially change the default behavior in the future.
This commit is contained in:
Mateusz Mandera
2020-01-15 16:28:46 +01:00
committed by Tim Abbott
parent 170e0ac2dd
commit 0c9c218e91
4 changed files with 70 additions and 8 deletions

View File

@@ -17,6 +17,8 @@ optional_address_tokens = {
"show-sender": default_option_handler_factory("show-sender"),
"include-footer": default_option_handler_factory("include-footer"),
"include-quotes": default_option_handler_factory("include-quotes"),
"prefer-text": lambda options: options.update(prefer_text=True),
"prefer-html": lambda options: options.update(prefer_text=False),
}
class ZulipEmailForwardError(Exception):