diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/xmpp')
-rw-r--r-- | src/main/java/de/pixart/messenger/xmpp/XmppConnection.java | 3 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/xmpp/stanzas/MessagePacket.java | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java index 54f72754c..571297851 100644 --- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java @@ -82,6 +82,7 @@ import de.pixart.messenger.utils.SSLSocketHelper; import de.pixart.messenger.utils.SocksSocketFactory; import de.pixart.messenger.utils.XmlHelper; import de.pixart.messenger.xml.Element; +import de.pixart.messenger.xml.LocalizedContent; import de.pixart.messenger.xml.Tag; import de.pixart.messenger.xml.TagWriter; import de.pixart.messenger.xml.XmlReader; @@ -1454,7 +1455,7 @@ public class XmppConnection implements Runnable { final Tag stream = Tag.start("stream:stream"); stream.setAttribute("to", account.getServer()); stream.setAttribute("version", "1.0"); - stream.setAttribute("xml:lang", "en"); + stream.setAttribute("xml:lang", LocalizedContent.STREAM_LANGUAGE); stream.setAttribute("xmlns", "jabber:client"); stream.setAttribute("xmlns:stream", "http://etherx.jabber.org/streams"); tagWriter.writeTag(stream); diff --git a/src/main/java/de/pixart/messenger/xmpp/stanzas/MessagePacket.java b/src/main/java/de/pixart/messenger/xmpp/stanzas/MessagePacket.java index 2f7d7e071..8b63527c4 100644 --- a/src/main/java/de/pixart/messenger/xmpp/stanzas/MessagePacket.java +++ b/src/main/java/de/pixart/messenger/xmpp/stanzas/MessagePacket.java @@ -4,6 +4,7 @@ import android.util.Pair; import de.pixart.messenger.parser.AbstractParser; import de.pixart.messenger.xml.Element; +import de.pixart.messenger.xml.LocalizedContent; public class MessagePacket extends AbstractAcknowledgeableStanza { public static final int TYPE_CHAT = 0; @@ -16,8 +17,8 @@ public class MessagePacket extends AbstractAcknowledgeableStanza { super("message"); } - public String getBody() { - return findChildContent("body"); + public LocalizedContent getBody() { + return findInternationalizedChildContentInDefaultNamespace("body"); } public void setBody(String text) { |