From 99433e4d6d8f5e879a4f9e209b2cb38bc5de2286 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Mon, 29 Apr 2013 14:10:44 +0800 Subject: [PATCH] MDL-39398 message: Prevent notice when sending Jabber messages Not tracking the presence prevents a notice to be displayed during disconnect(), where the the jabber server attempts to subscribe to $CFG->jabberusername presence. As the server name does not include a resource identifier (stillwit@jabber.org/resource), an explode('/') fails. --- message/output/jabber/message_output_jabber.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/message/output/jabber/message_output_jabber.php b/message/output/jabber/message_output_jabber.php index c4c997466b6..199e2aad849 100644 --- a/message/output/jabber/message_output_jabber.php +++ b/message/output/jabber/message_output_jabber.php @@ -73,6 +73,9 @@ class message_output_jabber extends message_output { $conn = new XMPPHP_XMPP($CFG->jabberhost,$CFG->jabberport,$CFG->jabberusername,$CFG->jabberpassword,'moodle',$CFG->jabberserver); + // No need to track the presence during the sending message process. + $conn->track_presence = false; + try { //$conn->useEncryption(false); $conn->connect();