18 lines
305 B
Go
Raw Normal View History

2018-11-22 01:27:53 +00:00
package groups
2019-06-03 09:32:43 +00:00
import "github.com/animenotifier/notify.moe/arn"
2018-11-22 01:27:53 +00:00
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
})
}