mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
first attempt to improve the global activity feed
This commit is contained in:
parent
1dca65a4c2
commit
79fb01e6a7
1 changed files with 10 additions and 1 deletions
|
@ -8,7 +8,16 @@ get '/activity' do
|
|||
global_dataset.where! Sequel.qualify(:events, :id) => params[:event_id]
|
||||
end
|
||||
|
||||
events = global_dataset.all
|
||||
initial_events = global_dataset.all
|
||||
events = []
|
||||
|
||||
initial_events.each do |event|
|
||||
site = Site.select(:id).where(id: event.site_id).first
|
||||
actioning_site = Site.select(:id).where(id: event.actioning_site_id).first
|
||||
|
||||
events.push(event) if !site.is_a_jerk? && !actioning_site.is_a_jerk? && actioning_site.follows_dataset.count > 2
|
||||
end
|
||||
|
||||
site_change_events = Event.global_site_changes_dataset.limit(100).all
|
||||
|
||||
@events = []
|
||||
|
|
Loading…
Add table
Reference in a new issue