Commit 5085f5d68681fb1ced83688110a351add5a40870

Authored by Antonio Terceiro
1 parent b11e1190

Being consistent

(ActionItem1703)
Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
lib/notify_activity_to_profiles_job.rb
@@ -17,12 +17,12 @@ class NotifyActivityToProfilesJob < Struct.new(:tracked_action_id) @@ -17,12 +17,12 @@ class NotifyActivityToProfilesJob < Struct.new(:tracked_action_id)
17 end 17 end
18 18
19 ActionTrackerNotification.connection.execute("insert into action_tracker_notifications(profile_id, action_tracker_id) values (#{tracked_action.user.id}, #{tracked_action.id})") 19 ActionTrackerNotification.connection.execute("insert into action_tracker_notifications(profile_id, action_tracker_id) values (#{tracked_action.user.id}, #{tracked_action.id})")
20 - ActionTrackerNotification.connection.execute("insert into action_tracker_notifications(profile_id, action_tracker_id) select friend_id, #{tracked_action_id} from friendships where person_id=#{tracked_action.user.id}") 20 + ActionTrackerNotification.connection.execute("insert into action_tracker_notifications(profile_id, action_tracker_id) select friend_id, #{tracked_action.id} from friendships where person_id=#{tracked_action.user.id}")
21 21
22 if target.is_a?(Community) 22 if target.is_a?(Community)
23 - ActionTrackerNotification.connection.execute("insert into action_tracker_notifications(profile_id, action_tracker_id) select distinct profiles.id, #{tracked_action_id} from role_assignments, profiles where profiles.type = 'Person' and profiles.id = role_assignments.accessor_id and profiles.id != #{tracked_action.user.id} and role_assignments.resource_type = 'Profile' and role_assignments.resource_id = #{target.id}") 23 + ActionTrackerNotification.connection.execute("insert into action_tracker_notifications(profile_id, action_tracker_id) select distinct profiles.id, #{tracked_action.id} from role_assignments, profiles where profiles.type = 'Person' and profiles.id = role_assignments.accessor_id and profiles.id != #{tracked_action.user.id} and role_assignments.resource_type = 'Profile' and role_assignments.resource_id = #{target.id}")
24 24
25 - ActionTrackerNotification.connection.execute("insert into action_tracker_notifications(profile_id, action_tracker_id) values (#{target.id}, #{tracked_action_id})") unless NOT_NOTIFY_COMMUNITY.include?(tracked_action.verb) 25 + ActionTrackerNotification.connection.execute("insert into action_tracker_notifications(profile_id, action_tracker_id) values (#{target.id}, #{tracked_action.id})") unless NOT_NOTIFY_COMMUNITY.include?(tracked_action.verb)
26 end 26 end
27 end 27 end
28 end 28 end