From 811137ef69f0f53e4bb8a4a731c6fb7302d3beb3 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Tue, 21 May 2019 01:51:34 -0500 Subject: [PATCH] if `created_at` is given to `PostStatusService` make sure it's utc --- app/services/post_status_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 1b105fdc5..9650aedc8 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -66,7 +66,7 @@ class PostStatusService < BaseService @text = @media.find(&:video?) ? '📹' : '🖼' if @media.size > 0 end - @footer = set_footer_from_i_am if @footer.nil? + @footer = set_footer_from_i_am if @footer.nil? && !@options[:no_footer] @visibility = @options[:visibility] || @account.user_default_visibility @visibility = :unlisted if @visibility.in?([nil, 'public']) && @account.silenced? || @account.force_unlisted @@ -185,7 +185,7 @@ class PostStatusService < BaseService def status_attributes { - created_at: @options[:created_at] ? @options[:created_at].to_datetime : Time.now.utc, + created_at: @options[:created_at] ? @options[:created_at].to_datetime.utc : Time.now.utc, text: @text, footer: @footer, media_attachments: @media || [],