minor fixing about message format

This commit is contained in:
Volkan Şahin 2016-06-29 12:39:18 +03:00
parent 39416fcb65
commit ac99ea633e
2 changed files with 3 additions and 3 deletions

View file

@ -282,7 +282,7 @@ class AhenkDeamon(BaseDaemon):
time.sleep(1)
if agreement_choice is not None:
messenger.send_direct_message(message_manager.agreement_answer_msg(username, agreement_choice))
messenger.send_direct_message(message_manager.agreement_answer_msg(username, str(agreement_choice).lower()))
else:
agreement_choice = True

View file

@ -152,9 +152,9 @@ class Messaging(object):
def agreement_answer_msg(self, username, answer):
data = {}
data['type'] = 'AGREEMENT_ANSWER'
data['type'] = 'AGREEMENT_STATUS'
data['username'] = username
data['answer'] = str(answer).upper()
data['accepted'] = str(answer).upper()
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 != '':