Oh, i was wrong about the last one. https://issues.igniterealtime.org/browse/SPARK-1782 is talking about not showing a popup for the chat tab that is now active and you chatting in it. So essentially you can replicate same change as for the MUC. If you are chatting and window is active, you are seeing new message anyway, so no need to show a popup in such case.