Skip to content

Commit

Permalink
filter on the channels nested value of statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
jtomchak committed Nov 14, 2023
1 parent f06a607 commit 129fda9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/lib/mammoth/channels.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def select_channels_with_statuses(channels, user)
# Ensure we are checking statues as far back at 48 hours
def filter_statuses_with_threshold
channels_with_statuses.map do |channel|
account_ids = account_ids(channel[:accounts])
statuses_with_accounts_from_channels(account_ids).filter_map { |s| engagment_threshold(s, channel[:fy_engagement_threshold]) }
channel[:statuses] = channel[:statuses].filter_map { |s| engagment_threshold(s, channel[:fy_engagement_threshold]) }
channel
end
end

Expand Down

0 comments on commit 129fda9

Please sign in to comment.