mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 09:42:15 +03:00
message format fixing
This commit is contained in:
parent
ab2e096f7b
commit
065c91ea81
1 changed files with 5 additions and 1 deletions
|
@ -140,11 +140,15 @@ class Messaging(object):
|
||||||
def agreement_request_msg(self):
|
def agreement_request_msg(self):
|
||||||
data = {}
|
data = {}
|
||||||
data['type'] = 'REQUEST_AGREEMENT'
|
data['type'] = 'REQUEST_AGREEMENT'
|
||||||
|
|
||||||
|
"""
|
||||||
contract_content = self.db_service.select_one_result('contract', 'content', 'id =(select MAX(id) from contract)')
|
contract_content = self.db_service.select_one_result('contract', 'content', 'id =(select MAX(id) from contract)')
|
||||||
if contract_content is not None and contract_content != '':
|
if contract_content is not None and contract_content != '':
|
||||||
data['md5'] = Util.get_md5_text(contract_content)
|
data['md5'] = Util.get_md5_text(contract_content)
|
||||||
else:
|
else:
|
||||||
data['md5'] = ''
|
data['md5'] = ''
|
||||||
|
"""
|
||||||
|
|
||||||
data['timestamp'] = Util.timestamp()
|
data['timestamp'] = Util.timestamp()
|
||||||
json_data = json.dumps(data)
|
json_data = json.dumps(data)
|
||||||
self.logger.debug('[Messaging] Agreement request message was created')
|
self.logger.debug('[Messaging] Agreement request message was created')
|
||||||
|
@ -154,7 +158,7 @@ class Messaging(object):
|
||||||
data = {}
|
data = {}
|
||||||
data['type'] = 'AGREEMENT_STATUS'
|
data['type'] = 'AGREEMENT_STATUS'
|
||||||
data['username'] = username
|
data['username'] = username
|
||||||
data['accepted'] = str(answer).upper()
|
data['accepted'] = answer
|
||||||
data['timestamp'] = Util.timestamp()
|
data['timestamp'] = Util.timestamp()
|
||||||
contract_content = self.db_service.select_one_result('contract', 'content', 'id =(select MAX(id) from contract)')
|
contract_content = self.db_service.select_one_result('contract', 'content', 'id =(select MAX(id) from contract)')
|
||||||
if contract_content is not None and contract_content != '':
|
if contract_content is not None and contract_content != '':
|
||||||
|
|
Loading…
Reference in a new issue