From 636db1f54fbd1690d083276b18f980cc5a51bcf0 Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 5 Mar 2019 21:09:18 +0100 Subject: When serializing polls over OStatus, serialize poll options to text (#10160) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * When serializing polls over OStatus, serialize poll options to text * Do the same for RSS feeds * Use “[ ] ” as a prefix for poll options instead of “- ” --- app/lib/formatter.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/lib/formatter.rb') diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index 0653214f5..b9845cb45 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -19,6 +19,10 @@ class Formatter raw_content = status.text + if options[:inline_poll_options] && status.poll + raw_content = raw_content + '\n\n' + status.poll.options.map { |title| "[ ] #{title}" }.join('\n') + end + return '' if raw_content.blank? unless status.local? -- cgit