Fix remote poll expiration time (#10144)
This commit is contained in:
parent
ad11260825
commit
952045604c
2 changed files with 2 additions and 2 deletions
|
@ -216,7 +216,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||||
expires_at = begin
|
expires_at = begin
|
||||||
if @object['closed'].is_a?(String)
|
if @object['closed'].is_a?(String)
|
||||||
@object['closed']
|
@object['closed']
|
||||||
elsif !@object['closed'].is_a?(FalseClass)
|
elsif !@object['closed'].nil? && !@object['closed'].is_a?(FalseClass)
|
||||||
Time.now.utc
|
Time.now.utc
|
||||||
else
|
else
|
||||||
@object['endTime']
|
@object['endTime']
|
||||||
|
|
|
@ -11,7 +11,7 @@ class ActivityPub::FetchRemotePollService < BaseService
|
||||||
expires_at = begin
|
expires_at = begin
|
||||||
if @json['closed'].is_a?(String)
|
if @json['closed'].is_a?(String)
|
||||||
@json['closed']
|
@json['closed']
|
||||||
elsif !@json['closed'].is_a?(FalseClass)
|
elsif !@object['closed'].nil? && !@object['closed'].is_a?(FalseClass)
|
||||||
Time.now.utc
|
Time.now.utc
|
||||||
else
|
else
|
||||||
@json['endTime']
|
@json['endTime']
|
||||||
|
|
Loading…
Reference in a new issue