esoftplay 0.0.136-c → 0.0.136-d

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.
Files changed (2) hide show
  1. package/error.ts +19 -1
  2. package/package.json +1 -1
package/error.ts CHANGED
@@ -79,6 +79,24 @@ export function reportApiError(fetch: any, error: any) {
79
79
  }
80
80
  }
81
81
 
82
+ export function sendTm(message: string, chat_id?: string): void {
83
+ let _chatids: string[] = []
84
+ if (chat_id) {
85
+ _chatids = [chat_id]
86
+ } else {
87
+ let config = esp?.config?.()
88
+ _chatids = config?.errorReport?.telegramIds
89
+ }
90
+ _chatids.forEach((cid: string) => {
91
+ let post = {
92
+ text: message,
93
+ chat_id: cid,
94
+ disable_web_page_preview: true
95
+ }
96
+ new LibCurl()?.custom?.('https://api.telegram.org/bot923808407:AAEFBlllQNKCEn8E66fwEzCj5vs9qGwVGT4/sendMessage', post)
97
+ })
98
+ }
99
+
82
100
  export function getError() {
83
101
  let config = esp?.config?.()
84
102
  AsyncStorage.getItem(config?.domain + 'error').then((e: any) => {
@@ -121,4 +139,4 @@ export function getError() {
121
139
  }
122
140
  })
123
141
  }
124
- ErrorUtils.setGlobalHandler(myErrorHandler)
142
+ //ErrorUtils[REMOVED by esoftplay web].setGlobalHandler(myErrorHandler)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.136-c",
3
+ "version": "0.0.136-d",
4
4
  "description": "embedding data from esoftplay framework (web based) into mobile app",
5
5
  "main": "cache/index.js",
6
6
  "types": "../../index.d.ts",