Commit Graph

3 Commits

Author SHA1 Message Date
Conrad Hoffmann
db966a275c carddav: do property filtering in match.Filter()
With this commit, the list of AddressObjects returned by `Filter()` will
always be a correct response to the query argument passed to it, even if
the input list contained objects with arbitraty properties present.
2022-06-03 08:36:05 +02:00
Conrad Hoffmann
21aea26c70 carddav: don't filter properties in test queries
As is, the tests in `match_test.go` test wrong behavior. They request
"partial retrieval" (i.e. filtering of returned properties), but compare
the returned result to the original input. They essentially rely on the
fact that property filtering is currently not implemented.

To fix this, simply make all existing test queries request all
properties. If property filtering gets implemented (correctly), the
tests will then continue to work. New tests can be added for testing
the property filtering itself.
2022-06-03 08:36:05 +02:00
Sebastien Binet
6d59672ed4 carddav: add filtering and matching helper functions
Updates emersion/hydroxide#159.

Signed-off-by: Sebastien Binet <binet@cern.ch>
Co-authored-by: Conrad Hoffmann <ch@bitfehler.net>
2022-03-01 10:06:11 +01:00