feat(assist-api): hack for our best client

This commit is contained in:
Alexander 2025-04-17 18:28:53 +02:00
parent 82a29f8623
commit fd39e03fd1
2 changed files with 8 additions and 1 deletions

View file

@ -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

View file

@ -19,7 +19,7 @@ const (
UserCountry = "userCountry"
UserState = "userState"
UserCity = "userCity"
Metadata = "metadata"
IsActive = "active"
)
type FilterOperator bool