zephyr_mirror: Parse zsig/body in its own function.
(imported from commit b692fa692d24d79f797852acffa0472d68930c88)
This commit is contained in:
parent
cf92525270
commit
b69201455c
|
@ -210,12 +210,15 @@ def process_loop(log):
|
|||
# Ask the Humbug server about any new classes to subscribe to
|
||||
update_subscriptions_from_humbug()
|
||||
|
||||
def process_notice(notice, log):
|
||||
def parse_zephyr_body(zephyr_data):
|
||||
try:
|
||||
zsig, body = notice.message.split("\x00", 1)
|
||||
(zsig, body) = zephyr_data.split("\x00", 1)
|
||||
except ValueError:
|
||||
body = notice.message
|
||||
zsig = ""
|
||||
(zsig, body) = ("", zephyr_data)
|
||||
return (zsig, body)
|
||||
|
||||
def process_notice(notice, log):
|
||||
(zsig, body) = parse_zephyr_body(notice.message)
|
||||
is_personal = False
|
||||
is_huddle = False
|
||||
|
||||
|
|
Loading…
Reference in a new issue