fix mailbox parsing
This commit is contained in:
parent
dccf561e3d
commit
d0e90531c6
@ -309,7 +309,7 @@ def process_sms(_rf_src, sms):
|
|||||||
os.remove('/tmp/gps_data_user_sos.txt')
|
os.remove('/tmp/gps_data_user_sos.txt')
|
||||||
logger.info('Removing SOS')
|
logger.info('Removing SOS')
|
||||||
elif '@' and 'M-' in sms:
|
elif '@' and 'M-' in sms:
|
||||||
message = re.sub('@.* |M-','',sms)
|
message = re.sub('^@|.* M-|','',sms)
|
||||||
recipient = re.sub('@| M-.*','',sms)
|
recipient = re.sub('@| M-.*','',sms)
|
||||||
mailbox_write(get_alias(int_id(_rf_src), subscriber_ids), int_id(_rf_src), time.strftime('%H:%M:%S - %m/%d/%y'), message, str(recipient).upper())
|
mailbox_write(get_alias(int_id(_rf_src), subscriber_ids), int_id(_rf_src), time.strftime('%H:%M:%S - %m/%d/%y'), message, str(recipient).upper())
|
||||||
elif '@REM MAIL' == sms:
|
elif '@REM MAIL' == sms:
|
||||||
|
@ -300,7 +300,7 @@ def process_sms(_rf_src, sms):
|
|||||||
os.remove('/tmp/gps_data_user_sos.txt')
|
os.remove('/tmp/gps_data_user_sos.txt')
|
||||||
logger.info('Removing SOS or Notice')
|
logger.info('Removing SOS or Notice')
|
||||||
elif '@' and 'M-' in sms:
|
elif '@' and 'M-' in sms:
|
||||||
message = re.sub('@.* |M-','',sms)
|
message = re.sub('^@|.* M-|','',sms)
|
||||||
recipient = re.sub('@| M-.*','',sms)
|
recipient = re.sub('@| M-.*','',sms)
|
||||||
mailbox_write(get_alias(int_id(_rf_src), subscriber_ids), int_id(_rf_src), time.strftime('%H:%M:%S - %m/%d/%y'), message, str(recipient).upper())
|
mailbox_write(get_alias(int_id(_rf_src), subscriber_ids), int_id(_rf_src), time.strftime('%H:%M:%S - %m/%d/%y'), message, str(recipient).upper())
|
||||||
elif '@REM MAIL' == sms:
|
elif '@REM MAIL' == sms:
|
||||||
|
Loading…
Reference in New Issue
Block a user