Skip to content

Commit 9350303

Browse files
committed
feat(status-message): should include app version and flavour
1 parent f06fb5c commit 9350303

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Hebrew Translation (thanks to Ahiel and Natan)
99
- Dutch Translation (thanks to all contributors)
1010
- Setting a preference that doesn't actually change the value won't have any effects (such as MQTT reconnecting) (#1875)
11+
- Status messages contain the app version and flavour
1112

1213
### Bug fixes
1314

project/app/src/main/java/org/owntracks/android/model/messages/MessageStatus.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties
55
import com.fasterxml.jackson.annotation.JsonInclude
66
import com.fasterxml.jackson.annotation.JsonProperty
77
import com.fasterxml.jackson.annotation.JsonTypeInfo
8+
import org.owntracks.android.BuildConfig
89
import org.owntracks.android.preferences.Preferences
910

1011
@JsonTypeInfo(
@@ -47,4 +48,8 @@ class AddMessageStatus {
4748
@JsonProperty("hib") var appHibernation = 0
4849

4950
@JsonProperty("loc") var locationPermission = 0
51+
52+
@JsonProperty("version") var version = BuildConfig.VERSION_CODE
53+
54+
@JsonProperty("flavour") var flavour = BuildConfig.FLAVOR
5055
}

project/app/src/main/java/org/owntracks/android/services/LocationProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ constructor(
248248
}
249249

250250
fun publishStatusMessage() {
251-
// Getting appHibernation takes a while, so lets not block the main thrad
251+
// Getting appHibernation takes a while, so lets not block the main thread
252252
scope.launch(ioDispatcher) {
253253
messageProcessor.queueMessageForSending(
254254
MessageStatus().apply {

0 commit comments

Comments
 (0)