renamed single to getChatroom and list to getChatrooms