MDL-63692 message: Correct favourite fetch

This commit is contained in:
Andrew Nicols 2018-11-20 14:34:49 +08:00 committed by Jun Pataleta
parent ffd303146f
commit 43f6899289

View File

@ -963,7 +963,7 @@ class api {
global $DB;
// Get the context for this conversation.
$conversation = $DB->get_records('message_conversations', ['id' => $conversationid]);
$conversation = $DB->get_record('message_conversations', ['id' => $conversationid]);
$userctx = \context_user::instance($userid);
if (empty($conversation->contextid)) {
// When the conversation hasn't any contextid value defined, the favourite will be added to the user context.