Skip to content
Snippets Groups Projects
Commit e97731de authored by Maxime Callet's avatar Maxime Callet Committed by Adrien Béraud
Browse files

LocationSharing: ensure better compatibility when receiving location data

Change-Id: I40ce16eef949053a2b347f906eb9bb53592fec39
parent eb0881a3
No related branches found
No related tags found
No related merge requests found
......@@ -144,11 +144,11 @@ class AccountService(
if (obj.size() < 2) return@flatMapMaybe Maybe.empty<Location>()
return@flatMapMaybe Maybe.just(Location(msg.accountId, msg.callId, Uri.fromId(msg.author), obj["time"].asLong).apply {
val t = obj["type"]
if (t == null || t.asString == Location.Type.Position.toString()) {
if (t == null || t.asString.lowercase() == Location.Type.Position.toString().lowercase()) {
type = Location.Type.Position
latitude = obj["lat"].asDouble
longitude = obj["long"].asDouble
} else if (t.asString == Location.Type.Stop.toString()) {
} else if (t.asString.lowercase() == Location.Type.Stop.toString().lowercase()) {
type = Location.Type.Stop
}
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment