From c670209021f9267cbd76fbcda3b1b474b4e12573 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 24 Apr 2017 09:43:30 -0500 Subject: [PATCH] allow `search('string here')` (#1408) --- src/client/rest/RESTMethods.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 91cbd25a1..15d65d67f 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -186,6 +186,7 @@ class RESTMethods { } search(target, options) { + if (typeof options === 'string') options = { content: options }; if (options.before) { if (!(options.before instanceof Date)) options.before = new Date(options.before); options.maxID = long.fromNumber(options.before.getTime() - 14200704e5).shiftLeft(22).toString();