Issue 163: Sometimes, error message comes not from transport but from
Status:  New
Owner: ----
Reported by yo...@cs.msu.su, Jan 30, 2009
PyICQt has a bad (IMO) habbit of sending error messages to users when it 
looses connection with ICQ server (there is a separate issue 114 about 
that).

But even worse - since some recent version, these messages are displayed 
by Psi client not as messages from ICQ transport, but as messages from 
ICQ contact I talked last to.

Just got that with 0.8.1.2 (latest as of now). Before, I've seen it with 
previous versions.

Here how it looks in Psi chat window:

...
[12:57:31] <XXX> Undefined condition.
The error condition is not one of those defined by the other conditions 
in this list.
------
Это в момент перед запуском тестаЭто в момент перед запуском теста
ICQ connection lost! Reason: [Failure instance: Traceback (failure with 
no frames): twisted.internet.error.ConnectionLost: Connection to the 
other side was lost in a non-clean fashion.
]


Even more interesting: the error text that appeared in the chat window, 
contains contact's message text ("Это в момент перед запуском теста") 
embedded in twise!
Feb 3, 2009
#1 tishka17
sometimes i've got just the same (not sure about doubled message text)
Feb 12, 2009
Project Member #2 r000ns...@gmail.com
Transport returns undelivered message with error explanation. If you chatting with
many users in one time this can help divide sent and unsent messages.
Feb 12, 2009
#3 yo...@cs.msu.su
> Transport returns undelivered message with error explanation.
> If you chatting with many users in one time this can help divide
> sent and unsent messages.

In the error message cited above, I can't see any information that explains that 
something was delivered or not delivered.

If the goal is to show an error message to the user, it should be clearly presented 
as such. For example, in a dialog box. Or, if that is technically not possible, 
then as a message from the transport. But *not* as a message inside chat.

And in some environments, users of the transport should not see any error message 
at all. Users may even don't know that transport exists, they just use a service 
set up for them by their admin.
Feb 16, 2009
#4 Master.N...@gmail.com
#2 No, transport just shows last sent message. Usually this message was successfully
delivered to contact many hours ago.
Feb 25, 2009
#5 mro...@gmail.com
This not cool. Every message comes with prefix:
Recipient unavailable.
The intended recipient is temporarily unavailable.
Unable to deliver message. Request denied
-----
<here_message>

---
But recipient gets the message! :\
Jun 4, 2009
Project Member #6 r000ns...@gmail.com
#1: > these messages are displayed by Psi client not as messages from ICQ transport,
but as messages from ICQ contact I talked last to
Seems it common feature of jabber clients. Gajim do same thing.

#5: > But recipient gets the message! :\
Recipient in invisible mode probably. In this case server returns this error because
user don't should know *real* recipient status.
Dec 3, 2010
#7 iron.udjin@gmail.com
Guys, here is workground:

--- icqt.py.orig        2010-12-04 02:20:19.000000000 +0200
+++ icqt.py     2010-12-04 02:18:21.000000000 +0200
@@ -54,7 +54,7 @@
                LogEvent(INFO, self.session.jabberID)
 
        def connectionLost(self, reason):
-               message = "ICQ connection lost! Reason: %s" % reason
+#              message = "ICQ connection lost! Reason: %s" % reason
                LogEvent(INFO, self.session.jabberID, message)
                try:
                        self.oscarcon.alertUser(message)