18 lines
294 B
Go
Raw Normal View History

2018-11-22 01:27:53 +00:00
package groups
import "github.com/animenotifier/arn"
2018-11-22 02:51:44 +00:00
func fetchGroups(memberID string) []*arn.Group {
2018-11-22 01:27:53 +00:00
return arn.FilterGroups(func(group *arn.Group) bool {
2018-11-22 02:51:44 +00:00
if group.IsDraft {
return false
}
if memberID != "" && !group.HasMember(memberID) {
return false
}
return true
2018-11-22 01:27:53 +00:00
})
}