From ecf7567a899668463f60ae3fb673ff8d2f13f6a9 Mon Sep 17 00:00:00 2001 From: Sara Arjona Date: Fri, 19 Oct 2018 10:11:42 +0200 Subject: [PATCH] MDL-63466 core_message: Add conversationid to message class --- lib/classes/message/message.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/classes/message/message.php b/lib/classes/message/message.php index 3202ea8f0d0..27e2edfcb32 100644 --- a/lib/classes/message/message.php +++ b/lib/classes/message/message.php @@ -34,13 +34,16 @@ defined('MOODLE_INTERNAL') || die(); * component string Component name. must exist in message_providers * name string Message type name. must exist in message_providers * userfrom object|int The user sending the message - * userto object|int The message recipient + * userto object|int The message recipient. This is mandatory for NOTIFICACIONS and 1:1 personal messages. * subject string The message subject * fullmessage string The full message in a given format * fullmessageformat int The format if the full message (FORMAT_MOODLE, FORMAT_HTML, ..) * fullmessagehtml string The full version (the message processor will choose with one to use) * smallmessage string The small version of the message * + * Required parameters of the $eventdata object for PERSONAL MESSAGES: + * convid int The conversation identifier where this message will be sent + * * Optional parameters of the $eventdata object: * notification bool Should the message be considered as a notification rather than a personal message * contexturl string If this is a notification then you can specify a url to view the event. @@ -71,6 +74,9 @@ class message { /** @var object|int The user who is sending this message. */ private $userfrom; + /** @var int The conversation id where userfrom is sending this message. */ + private $convid; + /** @var object|int The user who is receiving from which is sending this message. */ private $userto; @@ -123,6 +129,7 @@ class message { 'component', 'name', 'userfrom', + 'convid', 'userto', 'subject', 'fullmessage', -- 2.43.0