FIX: Inviting a group that I am part of creates a notification.

https://meta.discourse.org/t/inviting-a-group-to-a-message-does-not-trigger-a-notification-mail/50509/10?u=tgxworld
This commit is contained in:
Guo Xiang Tan
2018-03-05 13:49:11 +08:00
parent 42e0aaed61
commit 07f1d90b88
2 changed files with 3 additions and 1 deletions

View File

@ -765,7 +765,8 @@ SQL
group_id = group.id
group.users.where(
"group_users.notification_level > ?", NotificationLevels.all[:muted]
"group_users.notification_level > ? AND user_id != ?",
NotificationLevels.all[:muted], user.id
).find_each do |u|
u.notifications.create!(