crm: remove set command in body message

bzr revid: ced-cb4214aaf2206f93e1db8228892e4b2d0c119497
This commit is contained in:
ced 2007-08-01 14:03:55 +00:00
parent d7236046bb
commit 6d112d1c8c
1 changed files with 9 additions and 4 deletions

View File

@ -147,17 +147,22 @@ class email_parser(object):
def msg_user(self, msg, id):
body = self.msg_body_get(msg)
data = {
'email_last': body['body'],
'history_line': [(0, 0, {'description': body['body'], 'email': msg['From']})],
}
# handle email body commands (ex: Set-State: Draft)
actions = {}
body_data=''
for line in body['body'].split('\n'):
res = command_re.match(line)
if res:
actions[res.group(1).lower()] = res.group(2).lower()
else:
body_data += line+'\n'
body['body'] = body_data
data = {
'email_last': body['body'],
'history_line': [(0, 0, {'description': body['body'], 'email': msg['From']})],
}
act = 'case_close'
if 'state' in actions: