fix(api): correct mapping of user state queries (#9956)

# Which Problems Are Solved

the mapping of `ListUsers` was wrong for user states.

# How the Problems Are Solved

mapping of user state introduced to correctly map it

# Additional Changes

mapping of user type introduced to prevent same issue

# Additional Context

Requires backport to 2.x and 3.x

Co-authored-by: Livio Spring <livio.a@gmail.com>
(cherry picked from commit eb0eed21fa)
This commit is contained in:
Silvan
2025-05-26 13:23:38 +02:00
committed by Livio Spring
parent 3c99cf82f8
commit c9a0f0bc45
8 changed files with 113 additions and 9 deletions

View File

@@ -768,11 +768,11 @@ func NewUserVerifiedPhoneSearchQuery(value string, comparison TextComparison) (S
return NewTextQuery(NotifyVerifiedPhoneCol, value, comparison)
}
func NewUserStateSearchQuery(value int32) (SearchQuery, error) {
func NewUserStateSearchQuery(value domain.UserState) (SearchQuery, error) {
return NewNumberQuery(UserStateCol, value, NumberEquals)
}
func NewUserTypeSearchQuery(value int32) (SearchQuery, error) {
func NewUserTypeSearchQuery(value domain.UserType) (SearchQuery, error) {
return NewNumberQuery(UserTypeCol, value, NumberEquals)
}