diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-05-21 01:51:34 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:51 -0500 |
commit | 811137ef69f0f53e4bb8a4a731c6fb7302d3beb3 (patch) | |
tree | ee572c99141c09ac09ca27500586da632a3692a2 /app/services | |
parent | 8534702269c6602688dbaced870c12d021d148f1 (diff) |
if `created_at` is given to `PostStatusService` make sure it's utc
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/post_status_service.rb | 4 |
1 files 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 || [], |