Coffee grounds are fine additions to compost, and you can toss the entire batch -- including the filter -- onto the compost pile without any concerns. But indoors, be careful using coffee grounds. As the grounds decompose, they'll harbor fungi, which can attack and even kill your plants. A thick layer of grounds may also keep soil excessively moist, which can harm roots.
If you use grounds indoors, do so only sparingly, and avoid watering the plants unless the soil is dry to the touch. Coffee grounds acidify soil slightly, so although that may benefit gardenias and azaleas, which prefer acidic soils, it won't help an African violet. Cooled vegetable cooking water is fine to add to houseplants. Do so in moderation. Reuse only unsalted cooking water; salty water could burn your plants.