MQTT-For-Twisted-Python
MQTT-For-Twisted-Python copied to clipboard
Unsubscribe from multiple topics, fix messageId variable name
Fix messageId variable name when sending unsubscribe requests. Allow sending multiple topics in a single request. This does change the API, but is pretty much in line with subscriptionReceived() and subackReceived().
Could we have it support both an array and a single string? Something like
if type(topics) is str:
topics = [topics]
Sure, that looks reasonable. I am not a huge fan of these variable "type signatures", but the alternative would be to introduce a wrapper method which is not that great either. Thanks for having a look!