Update FlashMessageListener.php

add on request type check { ... }