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 ([email protected]/resource), an explode('/') fails.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user