mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Prevent sending emails and notifications to inactive users (#2384)
* Filter inactive users before sending emails or creating browser notifications Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * fix formatting issues Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * included requested changes Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com> * optimized database queries * rebasing new master and add tablenames for clarification in xorm queries * remove escaped quotationmarks using backticks Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
This commit is contained in:
committed by
Lunny Xiao
parent
b496e3e1cc
commit
d766d0c4e0
@@ -43,6 +43,11 @@ func TestGetIssueWatchers(t *testing.T) {
|
||||
|
||||
iws, err := GetIssueWatchers(1)
|
||||
assert.NoError(t, err)
|
||||
// Watcher is inactive, thus 0
|
||||
assert.Equal(t, 0, len(iws))
|
||||
|
||||
iws, err = GetIssueWatchers(2)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 1, len(iws))
|
||||
|
||||
iws, err = GetIssueWatchers(5)
|
||||
|
Reference in New Issue
Block a user