1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-14 06:51:08 +01:00

Make XMPPError imutable and add stanza reference

This commit is contained in:
Florian Schmaus 2015-12-08 08:22:50 +01:00
parent 83eda4c58d
commit 45feaecdf7
30 changed files with 308 additions and 94 deletions

View file

@ -169,7 +169,7 @@ public final class FileTransferManager extends Manager {
// Bytestream rejection as specified in XEP-65 5.3.1 Example 13, which says that
// 'not-acceptable' should be returned. This is done by Smack in
// Socks5BytestreamManager.replyRejectPacket(IQ).
IQ rejection = IQ.createErrorResponse(initiation, new XMPPError(
IQ rejection = IQ.createErrorResponse(initiation, XMPPError.getBuilder(
XMPPError.Condition.forbidden));
connection().sendStanza(rejection);
}

View file

@ -192,7 +192,7 @@ public final class FileTransferNegotiator extends Manager {
if (streamMethodField == null) {
String errorMessage = "No stream methods contained in stanza.";
XMPPError error = XMPPError.from(XMPPError.Condition.bad_request, errorMessage);
XMPPError.Builder error = XMPPError.from(XMPPError.Condition.bad_request, errorMessage);
IQ iqPacket = IQ.createErrorResponse(si, error);
connection().sendStanza(iqPacket);
throw new FileTransferException.NoStreamMethodsOfferedException();