dispatch: helps if i actually use the new text

This commit is contained in:
Brian S. Stephan 2015-06-20 11:26:35 -05:00
parent f542a862b8
commit 598a158300
1 changed files with 2 additions and 2 deletions

View File

@ -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)