adafruit / Adafruit_CircuitPython_AdafruitIO

Adafruit IO for CircuitPython
http://io.adafruit.com
MIT License
49 stars 33 forks source link

Allow group feeds to be subscribed to and unsubscribed from #78

Closed ryanplusplus closed 3 years ago

ryanplusplus commented 3 years ago

Currently it is not possible to subscribe to a group feed because IO_MQTT#subscribe validates feed_key unconditionally. When group_key is provided instead of feed_key, feed_key should not be required to be valid. This issue is also present in IO_MQTT#unsubscribe.

This change makes it so that IO_MQTT#subscribe and IO_MQTT#unsubscribe validate feed_key and group_key only when one is provided.