do not send band session join notification to band members

This commit is contained in:
Brian Smith 2014-03-09 14:44:06 -04:00
parent 5abc877a38
commit e250b0f175
1 changed files with 7 additions and 2 deletions

View File

@ -539,8 +539,13 @@ module JamRuby
notifications, online_followers, offline_followers = [], [], []
notification_msg = format_msg(NotificationTypes::BAND_SESSION_JOIN, nil, band)
band.followers.each do |bf|
follower = bf.user
followers = band.followers.map { |bf| bf.user }
# do not send band session notifications to band members
followers = followers - band.users
followers.each do |f|
follower = f
notification = Notification.new
notification.band_id = band.id
notification.description = NotificationTypes::BAND_SESSION_JOIN