Skip to content

Commit cfdb6c9

Browse files
authored
add extra mail address (#19)
1 parent fff6e56 commit cfdb6c9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/main/scala/fr/brouillard/gitbucket/announce/service/AnnounceService.scala

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@ trait AnnounceService {
3333
getAccountByGroupName(groupAccount)
3434
}
3535
userMailAddress.collect { case x
36-
if !x.isGroupAccount && x.mailAddress.nonEmpty && EmailAddress.isValid(x.mailAddress) => x.mailAddress
36+
if !x.isGroupAccount && x.mailAddress.nonEmpty =>
37+
x.mailAddress :: getAccountExtraMailAddresses(x.userName)
3738
}
38-
}.distinct.toList
39+
}
40+
.flatten
41+
.filter(mail => EmailAddress.isValid(mail))
42+
.distinct
43+
.toList
3944
}
40-
4145
}

0 commit comments

Comments
 (0)