Added comment before insert chat code
added API messages gateway