puvox-library 1.0.84 → 1.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library_standard.js +4 -4
- package/package.json +1 -1
package/library_standard.js
CHANGED
@@ -2710,16 +2710,16 @@ class PuvoxLibrary {
|
|
2710
2710
|
const requestOpts = Object.assign({'chat_id':chat_id, 'text':text}, extra_opts);
|
2711
2711
|
delete requestOpts['cache'];
|
2712
2712
|
delete requestOpts['is_repeated_call'];
|
2713
|
-
let
|
2713
|
+
let responseText = undefined;
|
2714
2714
|
try {
|
2715
|
-
|
2715
|
+
responseText = await this.getRemoteData('https://api.telegram.org/bot'+ bot_key +'/sendMessage', requestOpts); // pastebin_com/u0J1Cph3 //'sendMessage?'.http_build_query(opts, '');
|
2716
2716
|
} catch (ex) {
|
2717
2717
|
// todo: if html entities issue
|
2718
2718
|
requestOpts.text = this.encode_html_entities(requestOpts.text);
|
2719
|
-
|
2719
|
+
responseText = await this.getRemoteData('https://api.telegram.org/bot'+ bot_key +'/sendMessage', requestOpts);
|
2720
2720
|
}
|
2721
2721
|
try {
|
2722
|
-
const responseJson = JSON.parse(
|
2722
|
+
const responseJson = JSON.parse(responseText);
|
2723
2723
|
if (responseJson.ok){
|
2724
2724
|
return responseJson;
|
2725
2725
|
}
|