From 78847d0749765b7c1e424a8a264d8f23a43170b0 Mon Sep 17 00:00:00 2001 From: "M. Dietrich" Date: Wed, 20 May 2015 11:34:11 +0200 Subject: [PATCH 1/2] add extra jid to intend "show location" --- src/main/java/eu/siacs/conversations/utils/GeoHelper.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/eu/siacs/conversations/utils/GeoHelper.java b/src/main/java/eu/siacs/conversations/utils/GeoHelper.java index b31b9018..dd8ebd3d 100644 --- a/src/main/java/eu/siacs/conversations/utils/GeoHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/GeoHelper.java @@ -54,6 +54,7 @@ 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()); } From 4759607a772642735d57b476c9c474b128695027 Mon Sep 17 00:00:00 2001 From: "M. Dietrich" Date: Wed, 20 May 2015 15:43:45 +0200 Subject: [PATCH 2/2] fix to detect the sender jid correctly --- .../java/eu/siacs/conversations/utils/GeoHelper.java | 11 ++++++++--- 1 file 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);