Description
When metadata encryption is enabled for a channel like this:

searches based on custom metadata return no results.
The issue occurs regardless of the metadata values actually present in the messages.
To Reproduce
- Enable encryption for custom metadata in channel settings.
- Send one or more messages with custom metadata values.
- Go to the message browser or perform a metadata search.
- Observe that no messages are returned, even if metadata exists.
Expected behavior
Messages should still be searchable by custom metadata values, even when encryption is enabled.
Actual behavior
The search returns no results when encryption for custom metadata is active.
Screenshots
- The displayed custom metadata is encrypted:
- With these search filters there are no results:
Environment (please complete the following information):
- OS: All
- Java Distribution/Version All
- Connect Version: All
Description

When metadata encryption is enabled for a channel like this:
searches based on custom metadata return no results.
The issue occurs regardless of the metadata values actually present in the messages.
To Reproduce
Expected behavior
Messages should still be searchable by custom metadata values, even when encryption is enabled.
Actual behavior
The search returns no results when encryption for custom metadata is active.
Screenshots
Environment (please complete the following information):