Skip to content

Commit

Permalink
Fix remote poll expiration time (mastodon#10144)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and hiyuki2578 committed Oct 2, 2019
1 parent e1119d8 commit 205c83f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/activitypub/activity/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def process_poll
expires_at = begin
if @object['closed'].is_a?(String)
@object['closed']
elsif !@object['closed'].is_a?(FalseClass)
elsif !@object['closed'].nil? && !@object['closed'].is_a?(FalseClass)
Time.now.utc
else
@object['endTime']
Expand Down
2 changes: 1 addition & 1 deletion app/services/activitypub/fetch_remote_poll_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def call(poll, on_behalf_of = nil)
expires_at = begin
if @json['closed'].is_a?(String)
@json['closed']
elsif !@json['closed'].is_a?(FalseClass)
elsif !@object['closed'].nil? && !@object['closed'].is_a?(FalseClass)
Time.now.utc
else
@json['endTime']
Expand Down

0 comments on commit 205c83f

Please sign in to comment.