I’ve been thinking about the same issue, because I want to migrate our group chats from Skype to Jabber. Currently, I have the server set to always send the whole chat history on connect, so that participants still receive messages that have been sent while they were offline.
The problem now is that obviously most users do not wish to have all chat windows open at all times, so when they close a group chat, they leave it. And while they might still be online, they will not receive any notification about new messages in that room. The solution would be not to leave the chat when the window is closed, but to just destroy the UI representation of it. Pidgin does have that option. Now when a new message arrives, there would be different options - display a notification, re-open the UI, etc.
I haven’t looked deep enough into it to know whether that can be achieved by a plugin, but I guess that at least re-joining a chat in “silent mode” when the Chat-tab is closed would be possible. I’ll have to look into that.