From 065c91ea81b9334097e4ec9af65ac22ec45b5cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20=C5=9Eahin?= Date: Thu, 30 Jun 2016 17:04:44 +0300 Subject: [PATCH] message format fixing --- opt/ahenk/base/messaging/Messaging.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/opt/ahenk/base/messaging/Messaging.py b/opt/ahenk/base/messaging/Messaging.py index 54c70a0..57b988e 100644 --- a/opt/ahenk/base/messaging/Messaging.py +++ b/opt/ahenk/base/messaging/Messaging.py @@ -140,11 +140,15 @@ class Messaging(object): def agreement_request_msg(self): data = {} data['type'] = 'REQUEST_AGREEMENT' + + """ 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 != '': data['md5'] = Util.get_md5_text(contract_content) else: data['md5'] = '' + """ + data['timestamp'] = Util.timestamp() json_data = json.dumps(data) self.logger.debug('[Messaging] Agreement request message was created') @@ -154,7 +158,7 @@ class Messaging(object): data = {} data['type'] = 'AGREEMENT_STATUS' data['username'] = username - data['accepted'] = str(answer).upper() + data['accepted'] = answer data['timestamp'] = Util.timestamp() 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 != '':