mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
Merge commit 'b1a584d252f4df4c2a1a9400d6588b4f36768216' into glitch-soc/merge-4.3
Conflicts: - `app/lib/feed_manager.rb`: Not a real conflict, but glitch-soc has an extra `populate_direct_feed` method. Added upstream's code. In addition, upstream changed how notifications from follow subscriptions were handled, refactoring this file in the process. Ported upstream's changes. - `app/services/precompute_feed_service.rb`: Not a real conflict, glitch-soc has extra code for the direct feed. Added upstream's new code for populating lists. - `app/validators/poll_options_validator.rb`: Upstream split `PollValidator` in two, and glitch-soc had local changes to make the options configurable. Refactored as upstream did, keeping glitch-soc's configurable limits. - `app/workers/feed_insert_worker.rb`: Upstream changed how notifications from follow subscriptions were handled, refactoring this file in the process. Conflict is due to glitch-soc having an extra timeline type (direct). Ported upstream's changes.
This commit is contained in:
@@ -53,6 +53,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||
ApplicationRecord.transaction do
|
||||
@status = Status.create!(@params)
|
||||
attach_tags(@status)
|
||||
attach_mentions(@status)
|
||||
end
|
||||
|
||||
resolve_thread(@status)
|
||||
@@ -160,6 +161,15 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||
# not a big deal
|
||||
Trends.tags.register(status)
|
||||
|
||||
# Update featured tags
|
||||
return if @tags.empty? || !status.distributable?
|
||||
|
||||
@account.featured_tags.where(tag_id: @tags.pluck(:id)).find_each do |featured_tag|
|
||||
featured_tag.increment(status.created_at)
|
||||
end
|
||||
end
|
||||
|
||||
def attach_mentions(status)
|
||||
@mentions.each do |mention|
|
||||
mention.status = status
|
||||
mention.save
|
||||
|
||||
Reference in New Issue
Block a user