Skip to content

Commit

Permalink
Code improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
teehamaral committed Aug 16, 2017
1 parent 5673e78 commit 8b026c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions temba/msgs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ def process_message(cls, msg):
"""
Processes a message, running it through all our handlers
"""
from temba.orgs.models import CHATBASE_TYPE_USER
from temba.orgs.models import CHATBASE_TYPE_USER, CHATBASE_API_KEY, CHATBASE_VERSION

handlers = get_message_handlers()

Expand Down Expand Up @@ -847,8 +847,8 @@ def process_message(cls, msg):
# Registering data to send to Chatbase API later
org = msg.org
if org.is_connected_to_chatbase():
msg_task_json = msg.as_task_json()
cls.send_chatbase_log(msg_task_json['chatbase_api_key'], msg_task_json['chatbase_api_version'],
org_config_json = org.config_json()
cls.send_chatbase_log(org_config_json[CHATBASE_API_KEY], org_config_json[CHATBASE_VERSION],
msg.channel.name, msg.text, msg.contact.id, CHATBASE_TYPE_USER, chatbase_not_handled)

# record our handling latency for this object
Expand Down

0 comments on commit 8b026c1

Please sign in to comment.