ERROR type message handling (XIFF-46)

Hello,

I see the folowing code in trunk in XMPPConnection.as:

protected function handleMessage( node:XMLNode ):Message
          {
               var message:Message = new Message();                // Populate with data
               if ( !message.deserialize( node ) )
               {
                    throw new SerializationException();
               }                // ADDED in error handling for messages
               if ( message.type == Message.TYPE_ERROR )
               {
                    var exts:Array = message.getAllExtensions();
                    dispatchError( message.errorCondition, message.errorMessage,
                                      message.errorType, message.errorCode, exts.length > 0 ? exts[ 0 ] : null );
               }
               else
               {
                    var messageEvent:MessageEvent = new MessageEvent();
                    messageEvent.data = message;
                    dispatchEvent( messageEvent );
               }
               return message;
          }

I’ve noticed that sometimes the error text is in message body, not in the errorMessage, so in this case we loose the error info in error handlers. You can see that by installing Kraken plugin in Openfire server, enabling AIM transport and sending Register IQ to the AIM tranport JID with wrong AIM password. You’ll get an error message with “wrong password…” text stored in the message body.

In XIFF-46 issue there is a suitable solution but i cant’s see it in the trunk at this moment.

Thanks