[Psi-devel] I made some errors ;)
Maciek Niedzielski
machekku at uaznia.net
Wed Jun 7 13:10:57 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
As a side effect of my SoC project, I improved stanza error handling in
Psi (or rather Iris).
I did much work in Stanza::Error class. First of all, now it has
fromXml()/toXml() members, so you can easily create error element:
QDomElement e = createIQ(client()->doc(), "error", jid, id);
Error error(Stanza::Error::Auth, Stanza::Error::NotAuthorized);
e.appendChild(error.toXml(*client()->doc(),
client()->stream().baseNS()));
Secondly, I added error mappings based on JEP-0086. This means that now
Psi can read both old and new style errors (including error text, so no
more empty "Reason: " message boxes).
To make it more funny, if there is no error text at all, you can get
default error description from RFC.
Other thing: some of error message boxes in psi have formatted text
("<b>", etc), but had "\n" newlines, which don't work in formatted mode.
I changed them to "<br>".
You can pull these changes from Darcs repository located at
http://machekku.uaznia.net/darcs/psi/
Patches:
1. Improved stanza errors handling in Iris
2. Fixed formatted error message boxes
BTW: While testing my changes, I found a bug in Disco dialog.
To reproduce: try browsing a new server (like jabber.org) using Agents
protocol. In old Psi, you'd see error message. In new Psi, you don't get
any message.
- --
Maciek
xmpp:machekku at uaznia.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1-nr1 (Windows XP)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEhzLR7knNPWzAbeURAgQXAJ9DsIw6M/yXexpsU2dNILD8/4q/DwCfRmvk
VdjdTP7KI0RofnLU/pKTVE4=
=J8y9
-----END PGP SIGNATURE-----
More information about the psi-devel
mailing list