Steps:
1. In the class edit/creation section, select the "access" section.
2. Enable the chat button or disable it if you want to close chat for your classes.
3. Click on the "publish now" button to see the reflections of your chat enable and disabled option.