Filter bots out of notifications for members not in channel (#11655)
Этот коммит содержится в:
коммит произвёл
Christopher Poile
родитель
aef5ef4ed0
Коммит
a35adb3ae1
@@ -161,6 +161,17 @@ func (u UserSlice) IDs() []string {
|
||||
return ids
|
||||
}
|
||||
|
||||
func (u UserSlice) FilterWithoutBots() UserSlice {
|
||||
var matches []*User
|
||||
|
||||
for _, user := range u {
|
||||
if !user.IsBot {
|
||||
matches = append(matches, user)
|
||||
}
|
||||
}
|
||||
return UserSlice(matches)
|
||||
}
|
||||
|
||||
func (u UserSlice) FilterByActive(active bool) UserSlice {
|
||||
var matches []*User
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user