Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `app/controllers/statuses_controller.rb`: Minor conflict due to theming system
This commit is contained in:
@@ -8,7 +8,7 @@ class EntityCache
|
||||
MAX_EXPIRATION = 7.days.freeze
|
||||
|
||||
def mention(username, domain)
|
||||
Rails.cache.fetch(to_key(:mention, username, domain), expires_in: MAX_EXPIRATION) { Account.select(:username, :domain, :url).find_remote(username, domain) }
|
||||
Rails.cache.fetch(to_key(:mention, username, domain), expires_in: MAX_EXPIRATION) { Account.select(:id, :username, :domain, :url).find_remote(username, domain) }
|
||||
end
|
||||
|
||||
def emoji(shortcodes, domain)
|
||||
|
||||
@@ -308,9 +308,9 @@ class Formatter
|
||||
end
|
||||
|
||||
standard = Extractor.extract_entities_with_indices(text, options)
|
||||
xmpp = Extractor.extract_xmpp_uris_with_indices(text, options)
|
||||
extra = Extractor.extract_extra_uris_with_indices(text, options)
|
||||
|
||||
Extractor.remove_overlapping_entities(special + standard + xmpp)
|
||||
Extractor.remove_overlapping_entities(special + standard + extra)
|
||||
end
|
||||
|
||||
def html_friendly_extractor(html, options = {})
|
||||
|
||||
@@ -15,6 +15,10 @@ class InlineRenderer
|
||||
serializer = REST::NotificationSerializer
|
||||
when :conversation
|
||||
serializer = REST::ConversationSerializer
|
||||
when :announcement
|
||||
serializer = REST::AnnouncementSerializer
|
||||
when :reaction
|
||||
serializer = REST::ReactionSerializer
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
class Sanitize
|
||||
module Config
|
||||
HTTP_PROTOCOLS ||= ['http', 'https', 'dat', 'dweb', 'ipfs', 'ipns', 'ssb', 'gopher', 'xmpp', :relative].freeze
|
||||
HTTP_PROTOCOLS ||= ['http', 'https', 'dat', 'dweb', 'ipfs', 'ipns', 'ssb', 'gopher', 'xmpp', 'magnet', :relative].freeze
|
||||
|
||||
CLASS_WHITELIST_TRANSFORMER = lambda do |env|
|
||||
node = env[:node]
|
||||
|
||||
Reference in New Issue
Block a user