This endpoint will allow clients to search messages within a given conversation.
- Request params (room/group):
:to_id, :to_type, :query
. - Request params (user):
:conversation
,:query
. - If the query parameter is omitted from the request, it should behave exactly like the messages endpoint. Similarly, if the toggle and/or permission are disabled, it'll behave just like the messages endpoint does, without search filtering.
- If the necessary parameters are included: return a
200
, with a collection of messages that match the query. The response JSON should match the existing format exactly.
- On the above example, a where clause is used on the
messages
table, to filter to a particular conversation. If the:to_id
and:to_type
fields were indexed as well, could we filter by a particular conversation using only ElasticSearch? - Ensure the
body
field is being encrypted in Elastic.