fix parsing of message ACK/REJ; #23
This commit is contained in:
parent
ef5ecb8db5
commit
8a3a677c07
|
|
@ -73,7 +73,7 @@ def parse_message(body):
|
|||
logger.debug("Packet is just a regular message")
|
||||
parsed.update({'format': 'message'})
|
||||
|
||||
match = re.findall(r"^(ack|rej)\{([0-9]{1,5})$", body)
|
||||
match = re.findall(r"^(ack|rej)([0-9]{1,5})$", body)
|
||||
if match:
|
||||
response, number = match[0]
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ def parse_message(body):
|
|||
else:
|
||||
body = body[0:70]
|
||||
|
||||
match = re.findall(r"\{([0-9]{1,5})$", body)
|
||||
match = re.findall(r"([0-9]{1,5})$", body)
|
||||
if match:
|
||||
msgid = match[0]
|
||||
body = body[:len(body) - 1 - len(msgid)]
|
||||
|
|
|
|||
Loading…
Reference in New Issue