mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-64017 core_message: pass conversation type to processors
This commit is contained in:
parent
9bc1b8f8da
commit
ca754fc8c2
@ -109,6 +109,8 @@ class manager {
|
||||
// Get conversation type and name. We'll use this to determine which message subject to generate, depending on type.
|
||||
$conv = $DB->get_record('message_conversations', ['id' => $eventdata->convid], 'id, type, name');
|
||||
|
||||
$localisedeventdata->conversationtype = $conv->type;
|
||||
|
||||
// We treat individual conversations the same as any direct message with 'userfrom' and 'userto' specified.
|
||||
// We know the other user, so set the 'userto' field so that the event code will get access to this field.
|
||||
// If this was a legacy caller (eventdata->userto is set), then use that instead, as we want to use the fields specified
|
||||
|
@ -77,6 +77,9 @@ class message {
|
||||
/** @var int The conversation id where userfrom is sending this message. */
|
||||
private $convid;
|
||||
|
||||
/** @var int The conversation type, eg. \core_message\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL */
|
||||
private $conversationtype;
|
||||
|
||||
/** @var object|int The user who is receiving from which is sending this message. */
|
||||
private $userto;
|
||||
|
||||
@ -133,6 +136,7 @@ class message {
|
||||
'name',
|
||||
'userfrom',
|
||||
'convid',
|
||||
'conversationtype',
|
||||
'userto',
|
||||
'subject',
|
||||
'fullmessage',
|
||||
|
Loading…
x
Reference in New Issue
Block a user