mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 05:02:15 +03:00
context mail feature added to profile
This commit is contained in:
parent
f2c365fcb1
commit
c4500c8868
1 changed files with 7 additions and 1 deletions
|
@ -141,7 +141,7 @@ class Plugin(threading.Thread):
|
|||
if self.context.data is not None and self.context.get('responseCode') is not None:
|
||||
self.logger.debug('[Plugin] Creating response')
|
||||
response = Response(type=MessageType.TASK_STATUS.value, id=item_obj.get_id(),
|
||||
code=self.context.get('responseCode'),
|
||||
code=self.context.get('responseCode'),
|
||||
message=self.context.get('responseMessage'),
|
||||
data=self.context.get('responseData'),
|
||||
content_type=self.context.get('contentType'))
|
||||
|
@ -188,6 +188,12 @@ class Plugin(threading.Thread):
|
|||
profile_data = item_obj.get_profile_data()
|
||||
self.context.put('username', item_obj.get_username())
|
||||
|
||||
json_profile_data=json.loads(profile_data)
|
||||
self.context.set_mail_send(json_profile_data['mailSend'] if 'mailSend' in json_profile_data else False)
|
||||
self.context.set_mail_subject(json_profile_data['mailSubject'] if 'mailSubject' in json_profile_data else '')
|
||||
self.context.set_mail_content(json_profile_data['mailContent'] if 'mailContent' in json_profile_data else '')
|
||||
|
||||
|
||||
execution_id = self.get_execution_id(item_obj.get_id())
|
||||
policy_ver = self.get_policy_version(item_obj.get_id())
|
||||
|
||||
|
|
Loading…
Reference in a new issue