Progress on DMs responsiveness

Progress on DMs responsiveness
This commit is contained in:
mgabdev
2020-12-03 22:27:09 -05:00
parent 137a36b810
commit f6a7422704
29 changed files with 682 additions and 186 deletions

View File

@@ -80,6 +80,21 @@ class Formatter
include ActionView::Helpers::TextHelper
def chatMessageText(chatMessage)
raw_content = chatMessage.text
return '' if raw_content.blank?
html = raw_content
html = encode_and_link_urls(html, nil, keep_html: false)
html = reformat(html, true)
html = encode_custom_emojis(html, chatMessage.emojis)
html.html_safe # rubocop:disable Rails/OutputSafety
html
end
def format(status, **options)
if options[:use_markdown]
raw_content = status.markdown