Merge pull request #1212 from emdete/add_jid_to_show_location

fix to detect the sender jid correctly
This commit is contained in:
Daniel Gultsch 2015-05-20 18:31:18 +02:00
commit d908b70340
1 changed files with 8 additions and 3 deletions

View File

@ -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) {
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);