From 473cef32fac1f63fd6afd76c314400bf6751d066 Mon Sep 17 00:00:00 2001 From: Steven Dee Date: Sun, 15 Jun 2014 05:38:15 -0700 Subject: [PATCH] Send from our full jid (fixes #60) The problem wasn't with sending to bare jids, but rather sending *from* bare jids, which we did unless we were OTR encrypted for some reason. Google Talk supports the former, but (probably correctly) rejects the latter. --- src/eu/siacs/conversations/services/XmppConnectionService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 3ba1fdfd..ba26e105 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -817,6 +817,7 @@ public class XmppConnectionService extends Service { MessagePacket packet = new MessagePacket(); if (message.getConversation().getMode() == Conversation.MODE_SINGLE) { packet.setType(MessagePacket.TYPE_CHAT); + packet.setFrom(account.getFullJid()); if (otrSession != null) { try { packet.setBody(otrSession.transformSending(message @@ -831,11 +832,9 @@ public class XmppConnectionService extends Service { packet.addChild("no-copy", "urn:xmpp:hints"); packet.setTo(otrSession.getSessionID().getAccountID() + "/" + otrSession.getSessionID().getUserID()); - packet.setFrom(account.getFullJid()); } else { packet.setBody(message.getBody()); packet.setTo(message.getCounterpart()); - packet.setFrom(account.getJid()); } packet.addChild("markable", "urn:xmpp:chat-markers:0"); } else if (message.getConversation().getMode() == Conversation.MODE_MULTI) {