Commit 081ac915 authored by Damyon Wiese's avatar Damyon Wiese
Browse files

Merge branch 'MDL-24678-master-chat_get_latest_message' of

parents 2c3d8a06 38e7a952
......@@ -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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment