File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ func SendReport(
42
42
model string , // alphanumeric name
43
43
osVersion string ,
44
44
attachments []* Attachment ,
45
+ country string ,
45
46
) (err error ) {
46
47
return sendReport (
47
48
userConfig .GetDeviceID (),
@@ -57,6 +58,7 @@ func SendReport(
57
58
model ,
58
59
osVersion ,
59
60
attachments ,
61
+ country ,
60
62
)
61
63
}
62
64
@@ -74,14 +76,20 @@ func sendReport(
74
76
model string ,
75
77
osVersion string ,
76
78
attachments []* Attachment ,
79
+ country string ,
77
80
) error {
78
81
httpClient := & http.Client {
79
82
Transport : proxied .Fronted ("issue_fronted_roundtrip" ),
80
83
}
81
84
r := & Request {}
82
85
83
86
r .Type = Request_ISSUE_TYPE (issueType )
84
- r .CountryCode = geolookup .GetCountry (5 * time .Second )
87
+ if country == "" {
88
+ r .CountryCode = geolookup .GetCountry (5 * time .Second )
89
+ } else {
90
+ // This is temp due to IOS still uses the old geolookup
91
+ r .CountryCode = country
92
+ }
85
93
r .AppVersion = appVersion
86
94
r .SubscriptionLevel = subscriptionLevel
87
95
r .Platform = common .Platform
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ func TestSendReport(t *testing.T) {
72
72
Data : []byte ("Hello World" ),
73
73
},
74
74
},
75
+ "US" ,
75
76
)
76
77
if err != nil {
77
78
t .Errorf ("SendReport() error = %v" , err )
You can’t perform that action at this time.
0 commit comments