Merge pull request #209 from mrdomino/development

Send from our full jid (fixes #60)
This commit is contained in:
Daniel Gultsch 2014-06-15 15:38:52 +02:00
commit 7a164f7639
1 changed files with 1 additions and 2 deletions

View File

@ -817,6 +817,7 @@ public class XmppConnectionService extends Service {
MessagePacket packet = new MessagePacket(); MessagePacket packet = new MessagePacket();
if (message.getConversation().getMode() == Conversation.MODE_SINGLE) { if (message.getConversation().getMode() == Conversation.MODE_SINGLE) {
packet.setType(MessagePacket.TYPE_CHAT); packet.setType(MessagePacket.TYPE_CHAT);
packet.setFrom(account.getFullJid());
if (otrSession != null) { if (otrSession != null) {
try { try {
packet.setBody(otrSession.transformSending(message packet.setBody(otrSession.transformSending(message
@ -831,11 +832,9 @@ public class XmppConnectionService extends Service {
packet.addChild("no-copy", "urn:xmpp:hints"); packet.addChild("no-copy", "urn:xmpp:hints");
packet.setTo(otrSession.getSessionID().getAccountID() + "/" packet.setTo(otrSession.getSessionID().getAccountID() + "/"
+ otrSession.getSessionID().getUserID()); + otrSession.getSessionID().getUserID());
packet.setFrom(account.getFullJid());
} else { } else {
packet.setBody(message.getBody()); packet.setBody(message.getBody());
packet.setTo(message.getCounterpart()); packet.setTo(message.getCounterpart());
packet.setFrom(account.getJid());
} }
packet.addChild("markable", "urn:xmpp:chat-markers:0"); packet.addChild("markable", "urn:xmpp:chat-markers:0");
} else if (message.getConversation().getMode() == Conversation.MODE_MULTI) { } else if (message.getConversation().getMode() == Conversation.MODE_MULTI) {