allow search('string here') (#1408)

This commit is contained in:
Gus Caplan
2017-04-24 09:43:30 -05:00
committed by Crawl
parent 53eda09f72
commit c670209021

View File

@@ -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();