Skip to content

Commit

Permalink
added FOLLOWER_OF_CREATOR of privacyLevelOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Sep 20, 2024
1 parent b5bd213 commit b593d8a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tiktok/privacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ package tiktok
type PrivacyLevelOptions string

const (
PUBLIC_TO_EVERYONE PrivacyLevelOptions = "PUBLIC_TO_EVERYONE"
MUTUAL_FOLLOW_FRIENDS PrivacyLevelOptions = "MUTUAL_FOLLOW_FRIENDS"
SELF_ONLY PrivacyLevelOptions = "SELF_ONLY"
PUBLIC_TO_EVERYONE PrivacyLevelOptions = "PUBLIC_TO_EVERYONE"
MUTUAL_FOLLOW_FRIENDS PrivacyLevelOptions = "MUTUAL_FOLLOW_FRIENDS"
FOLLOWER_OF_CREATOR PrivacyLevelOptions = "FOLLOWER_OF_CREATOR"
SELF_ONLY PrivacyLevelOptions = "SELF_ONLY"
)

// CheckPrivacyLevel checks if the given string matches any PrivacyLevelOptions
func CheckPrivacyLevel(level string) bool {
switch PrivacyLevelOptions(level) {
case PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, SELF_ONLY:
case PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY:
return true
default:
return false
Expand Down

0 comments on commit b593d8a

Please sign in to comment.