about summary refs log tree commit diff
path: root/app/models/status.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-01-11 11:55:42 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-01-11 11:55:42 +0100
commit33d30632fb627ba1742eff3e0c5fc84ccd156cdb (patch)
treeb7c15bb354c9d2f0ef25c50ab387007703f599d6 /app/models/status.rb
parentd42e7e01dcd464f80637682d4eee6e5a7f36f26e (diff)
parent11d603101a7b3389c679b8c155a3cb06203ca31a (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/models/public_feed.rb`:
  Upstream refactored a bit, glitch-soc had specific code for local-only
  statuses.
  Updated glitch-soc's specific code accordingly.
Diffstat (limited to 'app/models/status.rb')
-rw-r--r--app/models/status.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 0d15304b6..766c13a40 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -387,7 +387,7 @@ class Status < ApplicationRecord
     def from_text(text)
       return [] if text.blank?
 
-      text.scan(FetchLinkCardService::URL_PATTERN).map(&:first).uniq.map do |url|
+      text.scan(FetchLinkCardService::URL_PATTERN).map(&:first).uniq.filter_map do |url|
         status = begin
           if TagManager.instance.local_url?(url)
             ActivityPub::TagManager.instance.uri_to_resource(url, Status)
@@ -396,7 +396,7 @@ class Status < ApplicationRecord
           end
         end
         status&.distributable? ? status : nil
-      end.compact
+      end
     end
   end