filter messages before enter