diff --git a/dr_botzo/dispatch/views.py b/dr_botzo/dispatch/views.py index 3265bd1..77b90ab 100644 --- a/dr_botzo/dispatch/views.py +++ b/dr_botzo/dispatch/views.py @@ -82,7 +82,7 @@ class DispatchMessage(generics.GenericAPIView): bot_url = 'http://{0:s}:{1:d}/'.format(settings.IRCBOT_XMLRPC_HOST, settings.IRCBOT_XMLRPC_PORT) bot = xmlrpclib.ServerProxy(bot_url) log.debug("sending '%s' to channel %s", text, action.destination) - bot.privmsg(action.destination, message.data['message']) + bot.privmsg(action.destination, text) except Exception as e: new_data = copy.deepcopy(message.data) new_data['status'] = "FAILED - {0:s}".format(e) @@ -93,7 +93,7 @@ class DispatchMessage(generics.GenericAPIView): filename = os.path.abspath(action.destination) log.debug("sending '%s' to file %s", text, filename) with open(filename, 'w') as f: - f.write(message.data['message']) + f.write(text) f.write(b'\n') new_data = copy.deepcopy(message.data)