Skip to content

Commit

Permalink
MDL-24678 mod_chat: Fixed race condition on chat module
Browse files Browse the repository at this point in the history
  • Loading branch information
bozoh committed Nov 24, 2017
1 parent c099963 commit d36fdb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/chat/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d36fdb9

Please sign in to comment.