diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-05-20 18:31:18 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-05-20 18:31:18 +0200 |
commit | d908b703405f63a10781514ae367569edb87e4c8 (patch) | |
tree | cdfd1095f88ace5c51eec1a9a6a191c58798c5ef /src/main | |
parent | bb065680e53232004fdd8b05ce7054abbdac75af (diff) | |
parent | 4759607a772642735d57b476c9c474b128695027 (diff) |
Merge pull request #1212 from emdete/add_jid_to_show_location
fix to detect the sender jid correctly
Diffstat (limited to '')
-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 dd8ebd3d..74f91a98 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); |