Disable all uses of pingTelemetry properly (#142)

This commit is contained in:
Brian Hackett 2025-06-08 18:38:55 -07:00 committed by GitHub
parent 611aa9fb82
commit 20769b071d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,10 @@ export function disableTelemetry() {
// We do this to work around CORS insanity.
export async function pingTelemetry(event: string, data: any) {
if (gDisableTelemetry) {
return;
}
const requestBody: any = {
event: 'NutChat.' + event,
data,
@ -32,10 +36,6 @@ export class ChatMessageTelemetry {
}
private _ping(event: string, data: any = {}) {
if (gDisableTelemetry) {
return;
}
pingTelemetry(event, {
...data,
messageId: this.id,