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
|
UserState *string `json:"userState"` // is
|
||||||
UserCity *string `json:"userCity"` // is
|
UserCity *string `json:"userCity"` // is
|
||||||
Metadata *map[string]string `json:"metadata"` // contains
|
Metadata *map[string]string `json:"metadata"` // contains
|
||||||
|
IsActive bool `json:"active"`
|
||||||
Raw interface{}
|
Raw interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -485,6 +486,12 @@ func matchesFilters(session *SessionData, filters []*Filter, counter map[string]
|
||||||
if session.UserCity != nil {
|
if session.UserCity != nil {
|
||||||
value = *session.UserCity
|
value = *session.UserCity
|
||||||
}
|
}
|
||||||
|
case IsActive:
|
||||||
|
if session.IsActive {
|
||||||
|
value = "true"
|
||||||
|
} else {
|
||||||
|
value = "false"
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
if val, ok := (*session.Metadata)[name]; ok {
|
if val, ok := (*session.Metadata)[name]; ok {
|
||||||
value = val
|
value = val
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ const (
|
||||||
UserCountry = "userCountry"
|
UserCountry = "userCountry"
|
||||||
UserState = "userState"
|
UserState = "userState"
|
||||||
UserCity = "userCity"
|
UserCity = "userCity"
|
||||||
Metadata = "metadata"
|
IsActive = "active"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FilterOperator bool
|
type FilterOperator bool
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue