Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `README.md`: Minor upstream change, our README is completely different. Kept ours. - `lib/tasks/assets.rake`: glitch-soc has extra code to deal with its theming system, upstream changed a line that exists in glitch-soc. Applied upstream changes.
This commit is contained in:
@ -285,7 +285,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||
|
||||
media_attachments
|
||||
rescue Addressable::URI::InvalidURIError => e
|
||||
Rails.logger.debug "Invalid URL in attachment: #{e}"
|
||||
Rails.logger.debug { "Invalid URL in attachment: #{e}" }
|
||||
media_attachments
|
||||
end
|
||||
|
||||
|
@ -6,7 +6,7 @@ class DeliveryFailureTracker
|
||||
FAILURE_DAYS_THRESHOLD = 7
|
||||
|
||||
def initialize(url_or_host)
|
||||
@host = url_or_host.start_with?('https://') || url_or_host.start_with?('http://') ? Addressable::URI.parse(url_or_host).normalized_host : url_or_host
|
||||
@host = url_or_host.start_with?('https://', 'http://') ? Addressable::URI.parse(url_or_host).normalized_host : url_or_host
|
||||
end
|
||||
|
||||
def track_failure!
|
||||
|
@ -18,7 +18,7 @@ module Extractor
|
||||
return [] if entities.empty?
|
||||
|
||||
entities = remove_overlapping_entities(entities)
|
||||
entities.each(&block) if block_given?
|
||||
entities.each(&block) if block
|
||||
entities
|
||||
end
|
||||
|
||||
|
@ -248,7 +248,7 @@ class LinkDetailsExtractor
|
||||
|
||||
structured_data
|
||||
rescue Oj::ParseError, EncodingError
|
||||
Rails.logger.debug("Invalid JSON-LD in #{@original_url}")
|
||||
Rails.logger.debug { "Invalid JSON-LD in #{@original_url}" }
|
||||
next
|
||||
end.first
|
||||
end
|
||||
|
@ -28,7 +28,7 @@ class ScopeTransformer < Parslet::Transform
|
||||
def merge!(other_scope)
|
||||
raise ArgumentError unless other_scope.namespace == namespace && other_scope.term == term
|
||||
|
||||
@access.concat(other_scope.instance_variable_get('@access'))
|
||||
@access.concat(other_scope.instance_variable_get(:@access))
|
||||
@access.uniq!
|
||||
@access.sort!
|
||||
|
||||
|
@ -9,10 +9,10 @@ class Vacuum::AccessTokensVacuum
|
||||
private
|
||||
|
||||
def vacuum_revoked_access_tokens!
|
||||
Doorkeeper::AccessToken.where('revoked_at IS NOT NULL').where('revoked_at < NOW()').delete_all
|
||||
Doorkeeper::AccessToken.where.not(revoked_at: nil).where('revoked_at < NOW()').delete_all
|
||||
end
|
||||
|
||||
def vacuum_revoked_access_grants!
|
||||
Doorkeeper::AccessGrant.where('revoked_at IS NOT NULL').where('revoked_at < NOW()').delete_all
|
||||
Doorkeeper::AccessGrant.where.not(revoked_at: nil).where('revoked_at < NOW()').delete_all
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user