E.g. one has set DND status (or Away or else) in Spark and then he takes a look into already opened chat window or opens new one. Then systray icon changes to its online state, though the status itself remains unchanged. This means that one can think, that he is online, just by looking at his systray icon, while he can still be DND unknowingly, unless he takes a look at the roster window.
It seems that even receiving a message (even into the same already opened tab) triggers icon change in the systray.
first attempt - pr submitted
Daryl and I have commented on your PR about one strange import, which doesn't seem to be required.
removed. I'm not sure how that got in there. probably imported it by mistake my the ide, but not removed when I fixed the code that brought it in.