wamd
wamd copied to clipboard
Adding __contains__ to the WhatsappMessage
That allows to check for membership of message properties using the 'in' keyword.
Example, current main:
m = WhatsAppMessage()
# this line halts, read the docs of __contains__
# https://docs.python.org/3/reference/datamodel.html#object.__contains__
'mime' in m
With this fix:
>>> 'mime' in m
False
>>> 'id' in m
True