fix splitting messages #1148)

* fix for issue #1120

* build fix
This commit is contained in:
Digitroinc
2017-01-29 13:58:35 -05:00
committed by Amish Shah
parent 2beb77ab5c
commit 448c93615b

View File

@@ -97,7 +97,7 @@ class RESTMethods {
const options = index === list.length ? { tts, embed } : { tts };
chan.send(list[index], options, index === list.length ? file : null).then((message) => {
messages.push(message);
if (index >= list.length) return resolve(messages);
if (index >= list.length - 1) return resolve(messages);
return sendChunk(list, ++index);
});
}(content, 0));