diff options
author | M. Dietrich <mdt@emdete.de> | 2015-05-20 15:43:45 +0200 |
---|---|---|
committer | M. Dietrich <mdt@emdete.de> | 2015-05-20 15:45:08 +0200 |
commit | 4759607a772642735d57b476c9c474b128695027 (patch) | |
tree | 9e96498f3b89e180fd34630a42a98586b0759c14 | |
parent | 78847d0749765b7c1e424a8a264d8f23a43170b0 (diff) |
fix to detect the sender jid correctly
-rw-r--r-- | src/main/java/eu/siacs/conversations/utils/GeoHelper.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/GeoHelper.java b/src/main/java/eu/siacs/conversations/utils/GeoHelper.java index dd8ebd3df..74f91a98b 100644 --- a/src/main/java/eu/siacs/conversations/utils/GeoHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/GeoHelper.java @@ -54,9 +54,14 @@ public class GeoHelper { Intent locationPluginIntent = new Intent("eu.siacs.conversations.location.show"); locationPluginIntent.putExtra("latitude",latitude); locationPluginIntent.putExtra("longitude",longitude); - locationPluginIntent.putExtra("jid",conversation.getJid().toString()); - if (conversation.getMode() == Conversation.MODE_SINGLE && message.getStatus() == Message.STATUS_RECEIVED) { - locationPluginIntent.putExtra("name",conversation.getName()); + if (conversation.getMode() == Conversation.MODE_SINGLE) { + if (message.getStatus() == Message.STATUS_RECEIVED) { + locationPluginIntent.putExtra("name",conversation.getName()); + locationPluginIntent.putExtra("jid",message.getCounterpart().toString()); + } + else { + locationPluginIntent.putExtra("jid",conversation.getAccount().getJid().toString()); + } } intents.add(locationPluginIntent); |