|
Instead of just using the text field of a message, use the rich_text
blocks to format the message.
The main reason for doing this was that messages that include images
suddenly started just having "This message contains interactive
elements." in the text field.
There are some other benefits as well:
- It fixes some bugs with multiple formatting styles not being applied
correctly.
- It fixes links in code blocks not being rendered verbatim (but with
text and url, like outside code blocks).
- It fixes code blocks sometimes having newlines after/before ``` and
sometimes not, depending on how the message was sent.
It looks like messages with images are now back to having the proper
text in the text field (for new messages), so this change isn't
necessary to fix that after all (except for for messages in the history
sent in the last couple of days), but since it fixes other issues as
well, it's best to keep it.
There is one bug left when inline code blocks contains links. Then there
will be ` characters before and after the link, which shouldn't be
there, but I'll leave fixing this for later.
Fixes #354, fixes #550, fixes #893
|