set apptype = legacy

This commit is contained in:
sawka 2024-09-19 11:39:43 -07:00
parent b2493880c7
commit 4d6f038b3f
2 changed files with 9 additions and 1 deletions

View File

@ -167,7 +167,14 @@ func SendTelemetry(ctx context.Context, force bool) error {
log.Printf("[pcloud] sending telemetry data\n") log.Printf("[pcloud] sending telemetry data\n")
dayStr := telemetry.GetCurDayStr() dayStr := telemetry.GetCurDayStr()
defaultShellType := shellapi.DetectLocalShellType() defaultShellType := shellapi.DetectLocalShellType()
input := TelemetryInputType{UserId: clientData.UserId, ClientId: clientData.ClientId, CurDay: dayStr, DefaultShell: defaultShellType, Activity: activity} input := TelemetryInputType{
UserId: clientData.UserId,
ClientId: clientData.ClientId,
AppType: "legacy",
CurDay: dayStr,
DefaultShell: defaultShellType,
Activity: activity,
}
req, err := makeAnonPostReq(ctx, TelemetryUrl, input) req, err := makeAnonPostReq(ctx, TelemetryUrl, input)
if err != nil { if err != nil {
return err return err

View File

@ -24,6 +24,7 @@ type TelemetryInputType struct {
ClientId string `json:"clientid"` ClientId string `json:"clientid"`
CurDay string `json:"curday"` CurDay string `json:"curday"`
DefaultShell string `json:"defaultshell"` DefaultShell string `json:"defaultshell"`
AppType string `json:"apptype"`
Activity []*telemetry.ActivityType `json:"activity"` Activity []*telemetry.ActivityType `json:"activity"`
} }