Skip to content

Commit 1f4b2d3

Browse files
authored
Upload app id and clean version to bug reports (#2829)
* Upload app id and clean version to bug reports * Add changelog
1 parent b95df7e commit 1f4b2d3

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

changelog.d/2829.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add missing `app_id` and `Version` properties to bug reports.

features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ class DefaultBugReporter @Inject constructor(
161161
.addFormDataPart("sdk_sha", sdkMetadata.sdkGitSha)
162162
.addFormDataPart("local_time", LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME))
163163
.addFormDataPart("utc_time", LocalDateTime.ofInstant(Instant.now(), ZoneOffset.UTC).format(DateTimeFormatter.ISO_DATE_TIME))
164+
.addFormDataPart("app_id", buildMeta.applicationId)
165+
// Nightly versions have a custom version name suffix that we should remove for the bug report
166+
.addFormDataPart("Version", buildMeta.versionName.replace("-nightly", ""))
164167
currentTracingFilter?.let {
165168
builder.addFormDataPart("tracing_filter", it)
166169
}

features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporterTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,6 @@ class DefaultBugReporterTest {
154154
}
155155

156156
companion object {
157-
private const val EXPECTED_NUMBER_OF_PROGRESS_VALUE = 15
157+
private const val EXPECTED_NUMBER_OF_PROGRESS_VALUE = 17
158158
}
159159
}

0 commit comments

Comments
 (0)