#
# Machekku Display message errors correctly
#
# Date: 2007-01-16
#
# psiaccount.cpp |   10 ++++++++--
# 1 file changed, 8 insertions(+), 2 deletions(-)
#
diff -rN -u old-psi-3/src/psiaccount.cpp new-psi-3/src/psiaccount.cpp
--- old-psi-3/src/psiaccount.cpp	2007-01-16 22:45:51.699176900 +0100
+++ new-psi-3/src/psiaccount.cpp	2007-01-16 22:47:49.449176900 +0100
@@ -1819,8 +1819,14 @@
 	if(!c)
 		c = findDialog<ChatDlg*>(m.from().full());
 
-	if(m.type() == "error")
-		m.setBody(m.error().text + "\n------\n" + m.body());
+	if(m.type() == "error") {
+		QString error = m.error().text;
+		if (error.isEmpty()) {
+			QPair<QString, QString> desc = m.error().description();
+			error = desc.first + "\n" + desc.second;
+		}
+		m.setBody(error + "\n------\n" + m.body());
+	}
 
 	// change the type?
 	if(m.type() != "headline" && m.invite().isEmpty() && m.mucInvites().isEmpty()) {

