Display error messages from the server about a contact in the roster
Problem
Sometimes, when a remote server on which a contact is doesn't a specific feature, it sends error messages back. This happened to me in the past with typing notification and user paying attention and (some) GTalk contacts, and now happens with (some other) GTalk and XEP-0163 events (song change). My own Jabber account, on which roster are these contacts, is not hosted by Google.
These error message are currently displayed as part of a chat, creating the window if it did not previously exist. The window also gets the EWMH URGENT hint. See screenshot.
Analysis
This can be really annoying as, depending on the WM configuration, urgent hints can switch the viewport/virtual desktop to said window, which seems necessary in this case.
The user attention and typing notification issue is now resolved as GTalk now supports it, but is worth describing as it gives an idea of the importance of the problem. Closing a chat window sends information that the local user is no longer paying attention. As this feature was unsupported, it created an error message which was sent back. This message then opened a new chat window with this user without an actual conversation taking place. This also happened when the user was off-line.
Enhancement recommendation
- Display the last error messages in the roster (e.g. in place of the status), as some others like remote-server-timeout already are.
- Iff a chat window is already open, display the error message in the chat window, but only if it is different than the previous error message (to avoid what is shown on the screenshot)
- Regardless of whether a chat window is open or not, do not behave as if it were an actual message i.e., do not set any EWMH URGENT hint, and do display a new message notification nor change the systray icon.