diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-01-12 10:15:46 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2023-01-12 10:15:46 +0100 |
commit | 3e63fcd4f07b13ba647dfa8a3bac6b1ebbd76614 (patch) | |
tree | 756a29c017aa843ddb0773627dabb27b08e45960 /app/services | |
parent | 932a22219ae99a285bdd0b69f02627f029327db3 (diff) | |
parent | 15b88a83ab7dbe022e33552f45f300fc69a934d0 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/models/status.rb`: Minor upstream refactor moved hook definitions around, and glitch-soc has an extra `before_create`. Moved the `before_create` accordingly. - `app/services/batched_remove_status_service.rb`: Minor upstream refactor changed a block in which glitch-soc had one extra call to handle direct timelines. Adapted changes to keep glitch-soc's extra call.
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/batched_remove_status_service.rb | 2 | ||||
-rw-r--r-- | app/services/verify_link_service.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/batched_remove_status_service.rb b/app/services/batched_remove_status_service.rb index 2b649ee22..e2c370057 100644 --- a/app/services/batched_remove_status_service.rb +++ b/app/services/batched_remove_status_service.rb @@ -20,7 +20,7 @@ class BatchedRemoveStatusService < BaseService ActiveRecord::Associations::Preloader.new.preload(statuses_with_account_conversations, [mentions: :account]) statuses_with_account_conversations.each do |status| - status.send(:unlink_from_conversations) + status.unlink_from_conversations! unpush_from_direct_timelines(status) end diff --git a/app/services/verify_link_service.rb b/app/services/verify_link_service.rb index 7496fe2d5..d049b52d1 100644 --- a/app/services/verify_link_service.rb +++ b/app/services/verify_link_service.rb @@ -26,7 +26,7 @@ class VerifyLinkService < BaseService def link_back_present? return false if @body.blank? - links = Nokogiri::HTML(@body).xpath('//a[contains(concat(" ", normalize-space(@rel), " "), " me ")]|//link[contains(concat(" ", normalize-space(@rel), " "), " me ")]') + links = Nokogiri::HTML5(@body).xpath('//a[contains(concat(" ", normalize-space(@rel), " "), " me ")]|//link[contains(concat(" ", normalize-space(@rel), " "), " me ")]') if links.any? { |link| link['href']&.downcase == @link_back.downcase } true |