Merge branch 'scheduled-unlisted'
This commit is contained in:
commit
e6a3f40029
1 changed files with 8 additions and 3 deletions
|
@ -435,15 +435,20 @@ const (
|
||||||
LegacyPurchaseContentTag = SpecialContentType("purchase:")
|
LegacyPurchaseContentTag = SpecialContentType("purchase:")
|
||||||
LegacyRentalContentTag = SpecialContentType("rental:")
|
LegacyRentalContentTag = SpecialContentType("rental:")
|
||||||
LegacyPreorderContentTag = SpecialContentType("preorder:")
|
LegacyPreorderContentTag = SpecialContentType("preorder:")
|
||||||
|
ScheduledShowContentTag = SpecialContentType("c:scheduled:show")
|
||||||
|
ScheduledHideContentTag = SpecialContentType("c:scheduled:hide")
|
||||||
|
UnlistedContentTag = SpecialContentType("c:unlisted")
|
||||||
)
|
)
|
||||||
|
|
||||||
type SpecialContentType string
|
type SpecialContentType string
|
||||||
|
|
||||||
//IsContentSpecial returns true if the claim is of a special content type
|
//IsContentSpecial returns true if the claim is of a special content type
|
||||||
func (c *Claim) IsContentSpecial(specialTag SpecialContentType) bool {
|
func (c *Claim) IsContentSpecial(specialTags ...SpecialContentType) bool {
|
||||||
for _, t := range c.Value.GetTags() {
|
for _, t := range c.Value.GetTags() {
|
||||||
if strings.Contains(t, string(specialTag)) {
|
for _, ct := range specialTags {
|
||||||
return true
|
if strings.Contains(t, string(ct)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue