about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-03-27 21:54:44 +0100
committerThibaut Girka <thib@sitedethib.com>2020-03-27 21:54:44 +0100
commit7b435fd9bf81265241fab792d8e8e0c2f4f1b619 (patch)
treeef366f436ed5180489cc9377268e10328fe9a932 /app/models
parent02f1c04fabab221130de8dfb5611be81825b193b (diff)
parent6c79b7237e31eb510af7df3f4f2cb133dea39845 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/services/post_status_service.rb`:
  CW/sensitive logic fixed upstream, but different in glitch-soc.
  Ported the changes accordingly.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/media_attachment.rb13
1 files changed, 0 insertions, 13 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index 59427a8cc..40624c73c 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -184,19 +184,6 @@ class MediaAttachment < ApplicationRecord
     audio? || video?
   end
 
-  def variant?(other_file_name)
-    return true if file_file_name == other_file_name
-    return false if file_file_name.nil?
-
-    formats = file.styles.values.map(&:format).compact
-
-    return false if formats.empty?
-
-    extension = File.extname(other_file_name)
-
-    formats.include?(extension.delete('.')) && File.basename(other_file_name, extension) == File.basename(file_file_name, File.extname(file_file_name))
-  end
-
   def to_param
     shortcode
   end