about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-10-27 09:45:25 -0500
committerDavid Yip <yipdw@member.fsf.org>2017-10-27 09:45:25 -0500
commit870d71b78be74b7fab4892a79a87aff39b1e2726 (patch)
tree0628116973b67c573509f8affe50cc3d6c9a6f4f /app/lib
parent656f5b6f87f2dcb80644edbedc4d2330eb5bee8d (diff)
parent781105293cf129c84ef0b91ec8cd27b7127cf951 (diff)
Merge branch 'master' into gs-master
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/activitypub/activity/create.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb
index d6e9bc1de..376684c00 100644
--- a/app/lib/activitypub/activity/create.rb
+++ b/app/lib/activitypub/activity/create.rb
@@ -53,9 +53,9 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
   end
 
   def process_tags(status)
-    return unless @object['tag'].is_a?(Array)
+    return if @object['tag'].nil?
 
-    @object['tag'].each do |tag|
+    as_array(@object['tag']).each do |tag|
       case tag['type']
       when 'Hashtag'
         process_hashtag tag, status
@@ -103,9 +103,9 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
   end
 
   def process_attachments(status)
-    return unless @object['attachment'].is_a?(Array)
+    return if @object['attachment'].nil?
 
-    @object['attachment'].each do |attachment|
+    as_array(@object['attachment']).each do |attachment|
       next if unsupported_media_type?(attachment['mediaType']) || attachment['url'].blank?
 
       href             = Addressable::URI.parse(attachment['url']).normalize.to_s