Merge branch 'MDL-24678-master-chat_get_latest_message' of https://github.com/bozoh/moodle
This commit is contained in:
+1
-1
@@ -566,7 +566,7 @@ function chat_get_latest_message($chatid, $groupid=0) {
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM {chat_messages_current} WHERE chatid = :chatid $groupselect
|
||||
ORDER BY timestamp DESC";
|
||||
ORDER BY timestamp DESC, id DESC";
|
||||
|
||||
// Return the lastest one message.
|
||||
return $DB->get_record_sql($sql, $params, true);
|
||||
|
||||
Reference in New Issue
Block a user