Handling now IncomingMessage object as message, refactor in js to better performance on chat user navigation