Show badge and play sound when a message comes in and the window does not have focus

Corresponding plugin change for candy-chat/candy#322