code: @ObjectiveCName("findTextMessagesWithPeer:withQuery:")
      public Command<List<MessageSearchEntity>> findTextMessages(Peer peer, String query) {
          return callback -> modules.getSearchModule().findTextMessages(peer, query)
                  .then(v -> callback.onResult(v))
                  .failure(e -> callback.onError(e));
      }
docs: Finding text messages by query
  
  @param peer  peer for search
  @param query query for search
  @return found messages