Dep Update

This commit is contained in:
2024-10-14 10:59:19 +02:00
parent d107b1a49f
commit 1cbde09ac6
10 changed files with 2393 additions and 3018 deletions

View File

@@ -1,6 +1,7 @@
import * as chrono from 'chrono-node'
import { TapiContact } from './tapi-contact'
import { axios, extractNumber } from './utils'
import { extractNumber } from './utils'
import GM_fetch from '@trim21/gm-fetch'
export class CallHistory {
private callerIds: { [number: string]: TapiContact } = {}
@@ -85,10 +86,10 @@ export class CallHistory {
if (this.callerIds[number] !== undefined) {
this.updateCallHistoryEntry(element, this.callerIds[number])
} else {
var response = await axios.get<TapiContact>('http://cpatapi.cpsrvweb2016.cp-austria.at/callerid/' + encodeURIComponent(number))
var response = await GM_fetch('http://cpatapi.cpsrvweb2016.cp-austria.at/callerid/' + encodeURIComponent(number))
var callerId: TapiContact = { tD_NAME: '' }
if (response.status === 200) {
callerId = response.data
callerId = await response.json() as TapiContact
}
console.log('TAPI call histroy callerid response', number, response, callerId)
this.callerIds[number] = callerId