Adding ChatPage functionality