Browse files

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 (,
an explode('/') fails.
  • Loading branch information...
FMCorz committed Apr 29, 2013
1 parent 3e7b95b commit 923f47005655c6f6bea8cefb4230af2e59333108
Showing with 3 additions and 0 deletions.
  1. +3 −0 message/output/jabber/message_output_jabber.php
@@ -73,6 +73,9 @@ function send_message($eventdata){
$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 {

0 comments on commit 923f470

Please sign in to comment.