Fix remote poll expiration time (#10144)

signup-info-prompt
Eugen Rochko 2019-03-04 00:44:34 +01:00 committed by GitHub
parent f821eca3b3
commit ae1b9cf70a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
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']

View File

@ -11,7 +11,7 @@ class ActivityPub::FetchRemotePollService < BaseService
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']