Update chat.cpp