Closed TimMatten closed 1 year ago
Describe the bug The property "CLIENT_TALK_REQUEST" of the client is of type boolean but should be of type string.
To Reproduce Code:
this.teamspeak.getClientById(key).then(async (tsClient) => { const clientInfos = await tsClient.getInfo(); console.log(clientInfos.clientTalkRequest); // return true or false });
Result via putty:
Expected behavior Should return a result of type string (timestamp of requesttime)
Versions used
Additional context Possible workaround until fix, using webquery.
export async function hasClientRequestedTalkpower(clid: string, httpService: HttpService) { const url = `http://${process.env.TS_IP}:${process.env.TS_PORT_QUERY_WEB_API}/byport/${process.env.TS_PORT}/clientinfo`; const response = await firstValueFrom( httpService.post( url, { clid: clid }, { headers: { 'x-api-key': process.env.TS_QUERY_WEB_API_KEY, }, }, ), ); return response.data.body[0]['client_talk_request'] != '0'; }
Describe the bug The property "CLIENT_TALK_REQUEST" of the client is of type boolean but should be of type string.
To Reproduce Code:
Result via putty:
Expected behavior Should return a result of type string (timestamp of requesttime)
Versions used
Additional context Possible workaround until fix, using webquery.