Merge remote-tracking branch 'parent/main' into upstream-20241231
This commit is contained in:
commit
3c77d4e8e4
268 changed files with 4213 additions and 3029 deletions
|
@ -64,6 +64,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
|||
ApplicationRecord.transaction do
|
||||
@status = Status.create!(@params)
|
||||
attach_tags(@status)
|
||||
attach_mentions(@status)
|
||||
attach_counts(@status)
|
||||
end
|
||||
|
||||
|
@ -228,6 +229,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue