Skip to content

Commit

Permalink
message MDL-24788 improved jabber notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Davis committed Oct 29, 2010
1 parent b2b204b commit 24a5674
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lang/en/message.php
Expand Up @@ -78,6 +78,7 @@
$string['noframesjs'] = 'Use more accessible interface';
$string['nomessages'] = 'No messages waiting';
$string['nomessagesfound'] = 'No messages were found';
$string['noreply'] = 'Do not reply to this message';
$string['nosearchresults'] = 'There were no results from your search';
$string['offline'] = 'Offline';
$string['offlinecontacts'] = 'Offline contacts ({$a})';
Expand Down
6 changes: 6 additions & 0 deletions message/output/jabber/message_output_jabber.php
Expand Up @@ -54,6 +54,12 @@ function send_message($eventdata){

$jabbermessage = fullname($eventdata->userfrom).': '.$eventdata->smallmessage;

if (!empty($eventdata->contexturl)) {
$jabbermessage .= "\n".get_string('view').': '.$eventdata->contexturl;
}

$jabbermessage .= "\n".get_string('noreply','message');

$conn = new XMPPHP_XMPP($CFG->jabberhost,$CFG->jabberport,$CFG->jabberusername,$CFG->jabberpassword,'moodle',$CFG->jabberserver);

try {
Expand Down

0 comments on commit 24a5674

Please sign in to comment.