aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/xmpp
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-13 23:40:08 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-13 23:40:08 +0100
commit42c4c1789a75c87b67c38ef9ca3f57ddd10f0548 (patch)
treec5bf69cb73c3e4c3be0439c175774561f8b0a5e7 /src/de/gultsch/chat/xmpp
parente63109215e9dda9152f0bc92bf230b652413a677 (diff)
basic otr support
Diffstat (limited to 'src/de/gultsch/chat/xmpp')
-rw-r--r--src/de/gultsch/chat/xmpp/MessagePacket.java1
-rw-r--r--src/de/gultsch/chat/xmpp/XmppConnection.java3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/de/gultsch/chat/xmpp/MessagePacket.java b/src/de/gultsch/chat/xmpp/MessagePacket.java
index 5da76152f..0d4d07d7d 100644
--- a/src/de/gultsch/chat/xmpp/MessagePacket.java
+++ b/src/de/gultsch/chat/xmpp/MessagePacket.java
@@ -42,6 +42,7 @@ public class MessagePacket extends Element {
}
public void setBody(String text) {
+ this.children.remove(findChild("body"));
Element body = new Element("body");
body.setContent(text);
this.children.add(body);
diff --git a/src/de/gultsch/chat/xmpp/XmppConnection.java b/src/de/gultsch/chat/xmpp/XmppConnection.java
index 337d8c7dd..1b9aa0c3a 100644
--- a/src/de/gultsch/chat/xmpp/XmppConnection.java
+++ b/src/de/gultsch/chat/xmpp/XmppConnection.java
@@ -411,6 +411,7 @@ public class XmppConnection implements Runnable {
}
public void sendMessagePacket(MessagePacket packet) {
+ Log.d(LOGTAG,"sending message packet "+packet.toString());
tagWriter.writeElement(packet);
}
@@ -440,6 +441,6 @@ public class XmppConnection implements Runnable {
public void disconnect() {
shouldConnect = false;
- tagWriter.writeTag(Tag.end("stream"));
+ tagWriter.writeTag(Tag.end("stream:stream"));
}
}