MQTT-For-Twisted-Python icon indicating copy to clipboard operation
MQTT-For-Twisted-Python copied to clipboard

Unsubscribe from multiple topics, fix messageId variable name

Open arjenroodselaar opened this issue 10 years ago • 2 comments

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().

arjenroodselaar avatar Sep 08 '14 22:09 arjenroodselaar

Could we have it support both an array and a single string? Something like

if type(topics) is str:
    topics = [topics]

adamvr avatar Sep 09 '14 08:09 adamvr

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!

arjenroodselaar avatar Sep 09 '14 17:09 arjenroodselaar