about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-04-15 22:37:44 +0100
committerJames Booth <boothj5@gmail.com>2016-04-15 22:37:44 +0100
commit8f009c3c8d373797bad5c0c604c71179dcc9d9ea (patch)
tree708a9ce401d4a51f0b8cdca90401d7823612f67f
parentb3a3351a350e60355f070c353cfbdcbaf5a66f05 (diff)
downloadprofani-tty-8f009c3c8d373797bad5c0c604c71179dcc9d9ea.tar.gz
Plugins fixed return values for python stanza hooks
-rw-r--r--src/plugins/python_plugins.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/python_plugins.c b/src/plugins/python_plugins.c
index c927c7a9..7861f484 100644
--- a/src/plugins/python_plugins.c
+++ b/src/plugins/python_plugins.c
@@ -646,7 +646,7 @@ python_on_message_stanza_receive_hook(ProfPlugin *plugin, const char *const text
             PyObject *result = PyObject_CallObject(p_function, p_args);
             python_check_error();
             Py_XDECREF(p_function);
-            if (PyBool_Check(result)) {
+            if (PyObject_IsTrue(result)) {
                 allow_python_threads();
                 return TRUE;
             } else {
@@ -711,7 +711,7 @@ python_on_presence_stanza_receive_hook(ProfPlugin *plugin, const char *const tex
             PyObject *result = PyObject_CallObject(p_function, p_args);
             python_check_error();
             Py_XDECREF(p_function);
-            if (PyBool_Check(result)) {
+            if (PyObject_IsTrue(result)) {
                 allow_python_threads();
                 return TRUE;
             } else {
@@ -776,7 +776,7 @@ python_on_iq_stanza_receive_hook(ProfPlugin *plugin, const char *const text)
             PyObject *result = PyObject_CallObject(p_function, p_args);
             python_check_error();
             Py_XDECREF(p_function);
-            if (PyBool_Check(result)) {
+            if (PyObject_IsTrue(result)) {
                 allow_python_threads();
                 return TRUE;
             } else {