Hi,
Below is a patch file for XMPPConnection.as, you can also read it from attachment. I’m sorry that I could not set background color for text.
As you can see, I want XMPPConnection not to fire error event when it meets a message with error type. Because I wish a message with error type has its own logic.
Thanks,
Index: H:/toybrick/xiff/src/org/jivesoftware/xiff/core/XMPPConnection.as
— H:/toybrick/xiff/src/org/jivesoftware/xiff/core/XMPPConnection.as (revision 10963)
+++ H:/toybrick/xiff/src/org/jivesoftware/xiff/core/XMPPConnection.as (working copy)
@@ -800,11 +800,11 @@
throw new SerializationException();
}
// ADDED in error handling for messages
-
if( msg.type == Message.ERROR_TYPE ) {
-
var exts:Array = msg.getAllExtensions();
-
dispatchError( msg.errorCondition, msg.errorMessage, msg.errorType, msg.errorCode, exts.length > 0 ? exts[0] : null);
-
}
-
else
+// if( msg.type == Message.ERROR_TYPE ) {
+// var exts:Array = msg.getAllExtensions();
+// dispatchError( msg.errorCondition, msg.errorMessage, msg.errorType, msg.errorCode, exts.length > 0 ? exts[0] : null);
+// }
+// else
{
var event:MessageEvent = new MessageEvent();
event.data = msg;
bbbb.patch (939 Bytes)