registration parameters were extended

This commit is contained in:
Volkan Şahin 2016-05-12 17:33:33 +03:00
parent 046ebe426b
commit a30213bf51

View file

@ -111,13 +111,16 @@ class Messaging(object):
def registration_msg(self): def registration_msg(self):
data = {} data = {}
data['type'] = 'REGISTER' data['type'] = 'REGISTER'
data['from'] = self.db_service.select_one_result('registration', 'jid', ' 1=1') # str(self.conf_manager.get('REGISTRATION', 'from')) data['from'] = self.db_service.select_one_result('registration', 'jid', ' 1=1')
data['password'] = self.db_service.select_one_result('registration', 'password', ' 1=1') data['password'] = self.db_service.select_one_result('registration', 'password', ' 1=1')
params = self.db_service.select_one_result('registration', 'params', ' 1=1') params = self.db_service.select_one_result('registration', 'params', ' 1=1')
data['parameters'] = json.loads(str(params))
json_params = json.loads(str(params)) json_params = json.loads(str(params))
data['macAddresses'] = json_params['macAddresses'] data['macAddresses'] = json_params['macAddresses']
data['ipAddresses'] = json_params['ipAddresses'] data['ipAddresses'] = json_params['ipAddresses']
data['hostname'] = json_params['hostname'] data['hostname'] = json_params['hostname']
data['timestamp'] = self.db_service.select_one_result('registration', 'timestamp', ' 1=1') data['timestamp'] = self.db_service.select_one_result('registration', 'timestamp', ' 1=1')
json_data = json.dumps(data) json_data = json.dumps(data)
self.logger.debug('[Messaging] Registration message was created') self.logger.debug('[Messaging] Registration message was created')