1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Merge Smack 4.1.0-rc3

Conflicts:
	smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/provider/BytestreamsProvider.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java
	version.gradle
This commit is contained in:
Florian Schmaus 2015-03-07 21:31:35 +01:00
commit c540ac9703
17 changed files with 71 additions and 60 deletions

View file

@ -21,6 +21,7 @@ import java.io.IOException;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream;
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream.Mode;
import org.jxmpp.jid.Jid;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@ -83,7 +84,11 @@ public class BytestreamsProvider extends IQProvider<Bytestream> {
}
}
toReturn.setMode((Bytestream.Mode.fromName(mode)));
if (mode == null) {
toReturn.setMode(Mode.tcp);
} else {
toReturn.setMode((Bytestream.Mode.fromName(mode)));
}
toReturn.setSessionID(id);
return toReturn;
}

View file

@ -1635,11 +1635,10 @@ public class MultiUserChat {
* Sends a message to the chat room.
*
* @param text the text of the message to send.
* @throws XMPPException if sending the message fails.
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendMessage(String text) throws XMPPException, NotConnectedException, InterruptedException {
public void sendMessage(String text) throws NotConnectedException, InterruptedException {
Message message = createMessage();
message.setBody(text);
connection.sendStanza(message);
@ -1673,11 +1672,10 @@ public class MultiUserChat {
* Sends a Message to the chat room.
*
* @param message the message.
* @throws XMPPException if sending the message fails.
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendMessage(Message message) throws XMPPException, NotConnectedException, InterruptedException {
public void sendMessage(Message message) throws NotConnectedException, InterruptedException {
message.setTo(room);
message.setType(Message.Type.groupchat);
connection.sendStanza(message);

View file

@ -27,7 +27,7 @@ import org.jivesoftware.smack.util.PacketParserUtils;
* extensions. This effectively extends the idea of an extension within one of the
* top level {@link Stanza} types to consider any embedded element to be an extension
* of its parent. This more easily enables the usage of some of Smacks parsing
* utilities such as {@link PacketParserUtils#parsePacketExtension(String, String, org.xmlpull.v1.XmlPullParser)} to be used
* utilities such as {@link PacketParserUtils#parseExtensionElement(String, String, org.xmlpull.v1.XmlPullParser)} to be used
* to parse any element of the XML being parsed.
*
* <p>Top level extensions have only one element, but they can have multiple children, or