diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-11-25 23:49:17 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-11-25 23:50:35 +0100 |
commit | 443ec4f8ba3d9f78acc1b89e2b29ad364cd5e956 (patch) | |
tree | 6c83fa75cc4f699503546be0a68409fffa11080f /app/services/reblog_service.rb | |
parent | 8c2fe2a846dd14914f7faa4bf71be21058249a93 (diff) | |
parent | b1fd6d44901a13450d22884b02eb6e9ae4fc1248 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/views/admin/tags/index.html.haml`: Removed upstream while it had changes in glitch-soc to accomodate for the theming system. Additional changes to accomodate for the theming system: - `app/views/admin/trends/links/preview_card_providers/index.html.haml` - `app/views/admin/trends/links/index.html.haml` - `app/views/admin/trends/tags/index.html.haml` - `app/views/admin/tags/show.html.haml`
Diffstat (limited to 'app/services/reblog_service.rb')
-rw-r--r-- | app/services/reblog_service.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/app/services/reblog_service.rb b/app/services/reblog_service.rb index f41276de0..42f8b9512 100644 --- a/app/services/reblog_service.rb +++ b/app/services/reblog_service.rb @@ -30,12 +30,13 @@ class ReblogService < BaseService reblog = account.statuses.create!(reblog: reblogged_status, text: '', visibility: visibility, rate_limit: options[:with_rate_limit]) + Trends.tags.register(reblog) + Trends.links.register(reblog) DistributionWorker.perform_async(reblog.id) ActivityPub::DistributionWorker.perform_async(reblog.id) unless reblogged_status.local_only? create_notification(reblog) bump_potential_friendship(account, reblog) - record_use(account, reblog) reblog end @@ -60,16 +61,6 @@ class ReblogService < BaseService PotentialFriendshipTracker.record(account.id, reblog.reblog.account_id, :reblog) end - def record_use(account, reblog) - return unless reblog.public_visibility? - - original_status = reblog.reblog - - original_status.tags.each do |tag| - tag.use!(account) - end - end - def build_json(reblog) Oj.dump(serialize_payload(ActivityPub::ActivityPresenter.from_status(reblog), ActivityPub::ActivitySerializer, signer: reblog.account)) end |