esoftplay 0.0.136-c → 0.0.136-e

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 +20 -1
  2. package/package.json +1 -1
package/error.ts CHANGED
@@ -79,6 +79,25 @@ 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 = Object.values(config?.errorReport?.telegramIds)
89
+ }
90
+ console.log(_chatids)
91
+ _chatids.forEach((cid: string) => {
92
+ let post = {
93
+ text: message,
94
+ chat_id: cid,
95
+ disable_web_page_preview: true
96
+ }
97
+ new LibCurl()?.custom?.('https://api.telegram.org/bot923808407:AAEFBlllQNKCEn8E66fwEzCj5vs9qGwVGT4/sendMessage', post)
98
+ })
99
+ }
100
+
82
101
  export function getError() {
83
102
  let config = esp?.config?.()
84
103
  AsyncStorage.getItem(config?.domain + 'error').then((e: any) => {
@@ -121,4 +140,4 @@ export function getError() {
121
140
  }
122
141
  })
123
142
  }
124
- ErrorUtils.setGlobalHandler(myErrorHandler)
143
+ //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-e",
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",