change js to new chats endpoint