gawel / panoramisk

asyncio based library to play with asterisk
https://panoramisk.readthedocs.io/
MIT License
151 stars 50 forks source link

Message class initializer shadows header Content as received by ReceivedSMS event #120

Open LukasMojzis opened 4 months ago

LukasMojzis commented 4 months ago

The contents of SMS is ''. I have resolved this by monkey patching the Message.init

from panoramisk import Message

def patched_init(self, headers, content=''):
    super(Message, self).__init__(content=content, **headers)
    self.manager = None

Message.__init__ = patched_init

Don't know what else it impacts but I can submit a pull request if it doesn't break Message.