@ -64,12 +64,14 @@ var AvailableHashAlgorithms = []string{
}
const (
// EmailNotificationsEnabled indicates that the user would like to receive all email notifications
// EmailNotificationsEnabled indicates that the user would like to receive all email notifications except your own
EmailNotificationsEnabled = "enabled"
// EmailNotificationsOnMention indicates that the user would like to be notified via email when mentioned.
EmailNotificationsOnMention = "onmention"
// EmailNotificationsDisabled indicates that the user would not like to be notified via email.
EmailNotificationsDisabled = "disabled"
// EmailNotificationsEnabled indicates that the user would like to receive all email notifications and your own
EmailNotificationsAndYourOwn = "andyourown"
)
// User represents the object of individual and member of organization.
@ -1045,7 +1047,7 @@ func GetMaileableUsersByIDs(ids []int64, isMention bool) ([]*User, error) {
Where ( "`type` = ?" , UserTypeIndividual ) .
And ( "`prohibit_login` = ?" , false ) .
And ( "`is_active` = ?" , true ) .
And ( "`email_notifications_preference` IN ( ?, ?) " , EmailNotificationsEnabled , EmailNotificationsOnMention ) .
In ( "`email_notifications_preference`" , EmailNotificationsEnabled , EmailNotificationsOnMention , EmailNotificationsAndYourOw n ) .
Find ( & ous )
}
@ -1053,7 +1055,7 @@ func GetMaileableUsersByIDs(ids []int64, isMention bool) ([]*User, error) {
Where ( "`type` = ?" , UserTypeIndividual ) .
And ( "`prohibit_login` = ?" , false ) .
And ( "`is_active` = ?" , true ) .
And ( "`email_notifications_preference` = ? " , EmailNotificationsEnabled ) .
In ( "`email_notifications_preference`" , EmailNotificationsEnabled , EmailNotificationsAndYourOwn ) .
Find ( & ous )
}