feat(assist-api): hack for our best client
This commit is contained in:
parent
82a29f8623
commit
fd39e03fd1
2 changed files with 8 additions and 1 deletions
|
|
@ -36,6 +36,7 @@ type SessionData struct {
|
|||
UserState *string `json:"userState"` // is
|
||||
UserCity *string `json:"userCity"` // is
|
||||
Metadata *map[string]string `json:"metadata"` // contains
|
||||
IsActive bool `json:"active"`
|
||||
Raw interface{}
|
||||
}
|
||||
|
||||
|
|
@ -485,6 +486,12 @@ func matchesFilters(session *SessionData, filters []*Filter, counter map[string]
|
|||
if session.UserCity != nil {
|
||||
value = *session.UserCity
|
||||
}
|
||||
case IsActive:
|
||||
if session.IsActive {
|
||||
value = "true"
|
||||
} else {
|
||||
value = "false"
|
||||
}
|
||||
default:
|
||||
if val, ok := (*session.Metadata)[name]; ok {
|
||||
value = val
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const (
|
|||
UserCountry = "userCountry"
|
||||
UserState = "userState"
|
||||
UserCity = "userCity"
|
||||
Metadata = "metadata"
|
||||
IsActive = "active"
|
||||
)
|
||||
|
||||
type FilterOperator bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue