diff --git a/src/ConversationManager.php b/src/ConversationManager.php index 31c150a..1e8dd24 100644 --- a/src/ConversationManager.php +++ b/src/ConversationManager.php @@ -23,8 +23,9 @@ public function __construct(Application $app = null) public function findByQueryString($query, $from = 0, $size = 99999, $sort = "", $msg_query = "") { - $query = urlencode($query); - $response = $this->fireRequest("GET", "/search?q={$query}&messages_query={$msg_query}&from={$from}&size={$size}&sort={$sort}"); + $query = urlencode($query); + $msg_query = urlencode($msg_query); + $response = $this->fireRequest("GET", "/search?q={$query}&messages_query={$msg_query}&from={$from}&size={$size}&sort={$sort}"); $response["hits"] = array_map( function ($hit) {