18 lines
305 B
Go
Raw Normal View History

2018-11-22 10:27:53 +09:00
package groups
2019-06-03 18:32:43 +09:00
import "github.com/animenotifier/notify.moe/arn"
2018-11-22 10:27:53 +09:00
2018-11-22 11:51:44 +09:00
func fetchGroups(memberID string) []*arn.Group {
2018-11-22 10:27:53 +09:00
return arn.FilterGroups(func(group *arn.Group) bool {
2018-11-22 11:51:44 +09:00
if group.IsDraft {
return false
}
if memberID != "" && !group.HasMember(memberID) {
return false
}
return true
2018-11-22 10:27:53 +09:00
})
}