about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/lib/activitypub/activity/create.rb2
-rw-r--r--app/services/activitypub/fetch_remote_poll_service.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb
index 793e20dbe..08c46be44 100644
--- a/app/lib/activitypub/activity/create.rb
+++ b/app/lib/activitypub/activity/create.rb
@@ -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']
diff --git a/app/services/activitypub/fetch_remote_poll_service.rb b/app/services/activitypub/fetch_remote_poll_service.rb
index ea75e8ef9..2f40625d6 100644
--- a/app/services/activitypub/fetch_remote_poll_service.rb
+++ b/app/services/activitypub/fetch_remote_poll_service.rb
@@ -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']