Add resource to chat message plugin hooks

This commit is contained in:
James Booth
2016-08-10 21:38:57 +01:00
parent 72542b75dc
commit 009a5c79a3
6 changed files with 110 additions and 110 deletions

View File

@@ -10,12 +10,12 @@ bot_session = {}
bot_state = False
def prof_post_chat_message_display(jid, message):
def prof_post_chat_message_display(barejid, resource, message):
if bot_state:
if jid not in bot_session:
bot_session[jid] = bot.create_session()
response = bot_session[jid].think(message)
prof.send_line("/msg " + jid + " " + response)
if barejid not in bot_session:
bot_session[barejid] = bot.create_session()
response = bot_session[barejid].think(message)
prof.send_line("/msg " + barejid + " " + response)
def _cmd_chatterbot(state):