Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

External message API

Copyright: 2011 Jerome Mouneyrac
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 3653 lines (144 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_message_external:: (129 methods):
  send_messages_to_conversation_parameters()
  send_messages_to_conversation()
  send_messages_to_conversation_returns()
  send_instant_messages_parameters()
  send_instant_messages()
  send_instant_messages_returns()
  delete_contacts_parameters()
  delete_contacts()
  delete_contacts_returns()
  mute_conversations_parameters()
  mute_conversations()
  mute_conversations_returns()
  unmute_conversations_parameters()
  unmute_conversations()
  unmute_conversations_returns()
  block_user_parameters()
  block_user()
  block_user_returns()
  unblock_user_parameters()
  unblock_user()
  unblock_user_returns()
  get_contact_requests_parameters()
  get_contact_requests()
  get_contact_requests_returns()
  get_received_contact_requests_count_parameters()
  get_received_contact_requests_count()
  get_received_contact_requests_count_returns()
  get_conversation_members_parameters()
  get_conversation_members()
  get_conversation_members_returns()
  create_contact_request_parameters()
  create_contact_request()
  create_contact_request_returns()
  confirm_contact_request_parameters()
  confirm_contact_request()
  confirm_contact_request_returns()
  decline_contact_request_parameters()
  decline_contact_request()
  decline_contact_request_returns()
  get_messagearea_contact_structure()
  get_conversation_structure()
  get_conversation_member_structure()
  get_conversation_message_structure()
  message_search_users_parameters()
  message_search_users()
  message_search_users_returns()
  data_for_messagearea_search_messages_parameters()
  data_for_messagearea_search_messages()
  data_for_messagearea_search_messages_returns()
  get_conversations_parameters()
  get_conversations()
  get_conversations_returns()
  get_conversation_parameters()
  get_conversation()
  get_conversation_returns()
  get_conversation_between_users_parameters()
  get_conversation_between_users()
  get_conversation_between_users_returns()
  get_self_conversation_parameters()
  get_self_conversation()
  get_self_conversation_returns()
  get_conversation_messages_parameters()
  get_conversation_messages()
  get_conversation_messages_returns()
  get_user_contacts_parameters()
  get_user_contacts()
  get_user_contacts_returns()
  search_contacts_parameters()
  search_contacts()
  search_contacts_returns()
  get_messages_parameters()
  get_messages()
  get_messages_returns()
  mark_all_notifications_as_read_parameters()
  mark_all_notifications_as_read()
  mark_all_notifications_as_read_returns()
  get_unread_conversations_count_parameters()
  get_unread_conversations_count()
  get_unread_conversations_count_returns()
  get_blocked_users_parameters()
  get_blocked_users()
  get_blocked_users_returns()
  mark_message_read_parameters()
  mark_message_read()
  mark_message_read_returns()
  mark_notification_read_parameters()
  mark_notification_read()
  mark_notification_read_returns()
  mark_all_conversation_messages_as_read_parameters()
  mark_all_conversation_messages_as_read()
  mark_all_conversation_messages_as_read_returns()
  delete_conversations_by_id_parameters()
  delete_conversations_by_id()
  delete_conversations_by_id_returns()
  delete_message_parameters()
  delete_message()
  delete_message_returns()
  message_processor_config_form_parameters()
  message_processor_config_form()
  message_processor_config_form_returns()
  get_message_processor_parameters()
  get_message_processor()
  get_message_processor_returns()
  validate_preferences_permissions()
  get_preferences_structure()
  get_user_notification_preferences_parameters()
  get_user_notification_preferences()
  get_user_notification_preferences_returns()
  get_user_message_preferences_parameters()
  get_user_message_preferences()
  get_user_message_preferences_returns()
  set_favourite_conversations_parameters()
  set_favourite_conversations()
  set_favourite_conversations_returns()
  unset_favourite_conversations_parameters()
  unset_favourite_conversations()
  unset_favourite_conversations_returns()
  get_member_info_parameters()
  get_member_info()
  get_member_info_returns()
  get_conversation_counts_parameters()
  get_conversation_counts()
  get_conversation_counts_returns()
  get_unread_conversation_counts_parameters()
  get_unread_conversation_counts()
  get_unread_conversation_counts_returns()
  delete_message_for_all_users_parameters()
  delete_message_for_all_users()
  delete_message_for_all_users_returns()


Class: core_message_external  - X-Ref

Message external functions

send_messages_to_conversation_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

send_messages_to_conversation(int $conversationid, array $messages = [])   X-Ref
Send messages from the current USER to a conversation.

This conversation may be any type of conversation, individual or group.

param: int $conversationid the id of the conversation to which the messages will be sent.
param: array $messages An array of message to send.
return: array the array of messages which were sent (created).

send_messages_to_conversation_returns()   X-Ref
Returns description of method result value.

return: \core_external\external_description

send_instant_messages_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

send_instant_messages($messages = array()   X-Ref
Send private messages from the current USER to other users

param: array $messages An array of message to send.
return: array

send_instant_messages_returns()   X-Ref
Returns description of method result value

return: \core_external\external_description

delete_contacts_parameters()   X-Ref
Delete contacts parameters description.

return: external_function_parameters

delete_contacts($userids, $userid = 0)   X-Ref
Delete contacts.

param: array $userids array of user IDs.
param: int $userid The id of the user we are deleting the contacts for
return: null

delete_contacts_returns()   X-Ref
Delete contacts return description.

return: \core_external\external_description

mute_conversations_parameters()   X-Ref
Mute conversations parameters description.

return: external_function_parameters

mute_conversations(int $userid, array $conversationids)   X-Ref
Mutes conversations.

param: int $userid The id of the user who is blocking
param: array $conversationids The list of conversations being muted
return: \core_external\external_description

mute_conversations_returns()   X-Ref
Mute conversations return description.

return: \core_external\external_description

unmute_conversations_parameters()   X-Ref
Unmute conversations parameters description.

return: external_function_parameters

unmute_conversations(int $userid, array $conversationids)   X-Ref
Unmute conversations.

param: int $userid The id of the user who is unblocking
param: array $conversationids The list of conversations being muted

unmute_conversations_returns()   X-Ref
Unmute conversations return description.

return: \core_external\external_description

block_user_parameters()   X-Ref
Block user parameters description.

return: external_function_parameters

block_user(int $userid, int $blockeduserid)   X-Ref
Blocks a user.

param: int $userid The id of the user who is blocking
param: int $blockeduserid The id of the user being blocked
return: \core_external\external_description

block_user_returns()   X-Ref
Block user return description.

return: \core_external\external_description

unblock_user_parameters()   X-Ref
Unblock user parameters description.

return: external_function_parameters

unblock_user(int $userid, int $unblockeduserid)   X-Ref
Unblock user.

param: int $userid The id of the user who is unblocking
param: int $unblockeduserid The id of the user being unblocked

unblock_user_returns()   X-Ref
Unblock user return description.

return: \core_external\external_description

get_contact_requests_parameters()   X-Ref
Returns contact requests parameters description.

return: external_function_parameters

get_contact_requests(int $userid, int $limitfrom = 0, int $limitnum = 0)   X-Ref
Handles returning the contact requests for a user.

This also includes the user data necessary to display information
about the user.

It will not include blocked users.

param: int $userid The id of the user we want to get the contact requests for
param: int $limitfrom
param: int $limitnum

get_contact_requests_returns()   X-Ref
Returns the contact requests return description.

return: \core_external\external_description

get_received_contact_requests_count_parameters()   X-Ref
Returns the number of contact requests the user has received parameters description.

return: external_function_parameters

get_received_contact_requests_count(int $userid)   X-Ref
Returns the number of contact requests the user has received.

param: int $userid The ID of the user we want to return the number of received contact requests for
return: external_value

get_received_contact_requests_count_returns()   X-Ref
Returns the number of contact requests the user has received return description.

return: external_value

get_conversation_members_parameters()   X-Ref
Returns get conversation members parameters description.

return: external_function_parameters

get_conversation_members(int $userid, int $conversationid, bool $includecontactrequests = false,bool $includeprivacyinfo = false, int $limitfrom = 0, int $limitnum = 0)   X-Ref
Returns a list of conversation members.

param: int $userid The user we are returning the conversation members for, used by helper::get_member_info.
param: int $conversationid The id of the conversation
param: bool $includecontactrequests Do we want to include contact requests with this data?
param: bool $includeprivacyinfo Do we want to include privacy info?
param: int $limitfrom
param: int $limitnum
return: array

get_conversation_members_returns()   X-Ref
Returns the get conversation members return description.

return: \core_external\external_description

create_contact_request_parameters()   X-Ref
Creates a contact request parameters description.

return: external_function_parameters

create_contact_request(int $userid, int $requesteduserid)   X-Ref
Creates a contact request.

param: int $userid The id of the user who is creating the contact request
param: int $requesteduserid The id of the user being requested

create_contact_request_returns()   X-Ref
Creates a contact request return description.

return: \core_external\external_description

confirm_contact_request_parameters()   X-Ref
Confirm a contact request parameters description.

return: external_function_parameters

confirm_contact_request(int $userid, int $requesteduserid)   X-Ref
Confirm a contact request.

param: int $userid The id of the user who is creating the contact request
param: int $requesteduserid The id of the user being requested

confirm_contact_request_returns()   X-Ref
Confirm a contact request return description.

return: \core_external\external_description

decline_contact_request_parameters()   X-Ref
Declines a contact request parameters description.

return: external_function_parameters

decline_contact_request(int $userid, int $requesteduserid)   X-Ref
Declines a contact request.

param: int $userid The id of the user who is creating the contact request
param: int $requesteduserid The id of the user being requested

decline_contact_request_returns()   X-Ref
Declines a contact request return description.

return: \core_external\external_description

get_messagearea_contact_structure()   X-Ref
Return the structure of a message area contact.

return: external_single_structure

get_conversation_structure()   X-Ref
Return the structure of a conversation.

return: external_single_structure

get_conversation_member_structure()   X-Ref
Return the structure of a conversation member.

return: external_single_structure

get_conversation_message_structure()   X-Ref
Return the structure of a message area message.

return: external_single_structure

message_search_users_parameters()   X-Ref
Get messagearea message search users parameters.

return: external_function_parameters

message_search_users($userid, $search, $limitfrom = 0, $limitnum = 0)   X-Ref
Get search users results.

param: int $userid The id of the user who is performing the search
param: string $search The string being searched
param: int $limitfrom
param: int $limitnum
return: array

message_search_users_returns()   X-Ref
Get messagearea message search users returns.

return: external_single_structure

data_for_messagearea_search_messages_parameters()   X-Ref
Get messagearea search messages parameters.

return: external_function_parameters

data_for_messagearea_search_messages($userid, $search, $limitfrom = 0, $limitnum = 0)   X-Ref
Get messagearea search messages results.

param: int $userid The id of the user who is performing the search
param: string $search The string being searched
param: int $limitfrom
param: int $limitnum
return: stdClass

data_for_messagearea_search_messages_returns()   X-Ref
Get messagearea search messages returns.

return: external_single_structure

get_conversations_parameters()   X-Ref
Get conversations parameters.

return: external_function_parameters

get_conversations($userid, $limitfrom = 0, $limitnum = 0, int $type = null, bool $favourites = null,bool $mergeself = false)   X-Ref
Get the list of conversations for the user.

param: int $userid The id of the user who is performing the search
param: int $limitfrom
param: int $limitnum
param: int|null $type
param: bool|null $favourites
param: bool $mergeself whether to include self-conversations (true) or ONLY private conversations (false)
return: stdClass

get_conversations_returns()   X-Ref
Get conversations returns.

return: external_single_structure

get_conversation_parameters()   X-Ref
Get conversation parameters.

return: external_function_parameters

get_conversation(int $userid,int $conversationid,bool $includecontactrequests = false,bool $includeprivacyinfo = false,int $memberlimit = 0,int $memberoffset = 0,int $messagelimit = 0,int $messageoffset = 0,bool $newestmessagesfirst = true)   X-Ref
Get a single conversation.

param: int $userid The user id to get the conversation for
param: int $conversationid The id of the conversation to fetch
param: bool $includecontactrequests Should contact requests be included between members
param: bool $includeprivacyinfo Should privacy info be included between members
param: int $memberlimit Limit number of members to load
param: int $memberoffset Offset members by this amount
param: int $messagelimit Limit number of messages to load
param: int $messageoffset Offset the messages
param: bool $newestmessagesfirst Order messages by newest first
return: stdClass

get_conversation_returns()   X-Ref
Get conversation returns.

return: external_single_structure

get_conversation_between_users_parameters()   X-Ref
Get conversation parameters.

return: external_function_parameters

get_conversation_between_users(int $userid,int $otheruserid,bool $includecontactrequests = false,bool $includeprivacyinfo = false,int $memberlimit = 0,int $memberoffset = 0,int $messagelimit = 0,int $messageoffset = 0,bool $newestmessagesfirst = true)   X-Ref
Get a single conversation between users.

param: int $userid The user id to get the conversation for
param: int $otheruserid The other user id
param: bool $includecontactrequests Should contact requests be included between members
param: bool $includeprivacyinfo Should privacy info be included between members
param: int $memberlimit Limit number of members to load
param: int $memberoffset Offset members by this amount
param: int $messagelimit Limit number of messages to load
param: int $messageoffset Offset the messages
param: bool $newestmessagesfirst Order messages by newest first
return: stdClass

get_conversation_between_users_returns()   X-Ref
Get conversation returns.

return: external_single_structure

get_self_conversation_parameters()   X-Ref
Get self-conversation parameters.

return: external_function_parameters

get_self_conversation(int $userid,int $messagelimit = 0,int $messageoffset = 0,bool $newestmessagesfirst = true)   X-Ref
Get a single self-conversation.

param: int $userid The user id to get the self-conversation for
param: int $messagelimit Limit number of messages to load
param: int $messageoffset Offset the messages
param: bool $newestmessagesfirst Order messages by newest first
return: stdClass

get_self_conversation_returns()   X-Ref
Get conversation returns.

return: external_single_structure

get_conversation_messages_parameters()   X-Ref
The conversation messages parameters.

return: external_function_parameters

get_conversation_messages(int $currentuserid, int $convid, int $limitfrom = 0, int $limitnum = 0,bool $newest = false, int $timefrom = 0)   X-Ref
Get conversation messages.

param: int $currentuserid The current user's id.
param: int $convid The conversation id.
param: int $limitfrom Return a subset of records, starting at this point (optional).
param: int $limitnum Return a subset comprising this many records in total (optional, required if $limitfrom is set).
param: bool $newest True for getting first newest messages, false otherwise.
param: int  $timefrom The time from the conversation messages to get.
return: array The messages and members who have sent some of these messages.

get_conversation_messages_returns()   X-Ref
The messagearea messages return structure.

return: external_single_structure

get_user_contacts_parameters()   X-Ref
The user contacts return parameters.

return: external_function_parameters

get_user_contacts(int $userid, int $limitfrom = 0, int $limitnum = 0)   X-Ref
Get user contacts.

param: int $userid The id of the user who we are viewing conversations for
param: int $limitfrom
param: int $limitnum
return: array

get_user_contacts_returns()   X-Ref
The user contacts return structure.

return: external_multiple_structure

search_contacts_parameters()   X-Ref
Search contacts parameters description.

return: external_function_parameters

search_contacts($searchtext, $onlymycourses = false)   X-Ref
Search contacts.

param: string $searchtext query string.
param: bool $onlymycourses limit the search to the user's courses only.
return: \core_external\external_description

search_contacts_returns()   X-Ref
Search contacts return description.

return: \core_external\external_description

get_messages_parameters()   X-Ref
Get messages parameters description.

return: external_function_parameters

get_messages($useridto, $useridfrom = 0, $type = 'both', $read = MESSAGE_GET_READ,$newestfirst = true, $limitfrom = 0, $limitnum = 0)   X-Ref
Get messages function implementation.

param: int      $useridto       the user id who received the message
param: int      $useridfrom     the user id who send the message. -10 or -20 for no-reply or support user
param: string   $type           type of message to return, expected values: notifications, conversations and both
param: int      $read           1 for getting read messages, 0 for unread, 2 for both
param: bool     $newestfirst    true for ordering by newest first, false for oldest first
param: int      $limitfrom      limit from
param: int      $limitnum       limit num
return: \core_external\external_description

get_messages_returns()   X-Ref
Get messages return description.

return: external_single_structure

mark_all_notifications_as_read_parameters()   X-Ref
Mark all notifications as read parameters description.

return: external_function_parameters

mark_all_notifications_as_read($useridto, $useridfrom, $timecreatedto = 0)   X-Ref
Mark all notifications as read function.

param: int      $useridto       the user id who received the message
param: int      $useridfrom     the user id who send the message. -10 or -20 for no-reply or support user
param: int      $timecreatedto  mark message created before this time as read, 0 for all messages
return: \core_external\external_description

mark_all_notifications_as_read_returns()   X-Ref
Mark all notifications as read return description.

return: external_single_structure

get_unread_conversations_count_parameters()   X-Ref
Get unread conversations count parameters description.

return: external_function_parameters

get_unread_conversations_count($useridto)   X-Ref
Get unread messages count function.

param: int      $useridto       the user id who received the message
return: \core_external\external_description

get_unread_conversations_count_returns()   X-Ref
Get unread conversations count return description.

return: external_single_structure

get_blocked_users_parameters()   X-Ref
Get blocked users parameters description.

return: external_function_parameters

get_blocked_users($userid)   X-Ref
Retrieve a list of users blocked

param: int $userid the user whose blocked users we want to retrieve
return: \core_external\external_description

get_blocked_users_returns()   X-Ref
Get blocked users return description.

return: external_single_structure

mark_message_read_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

mark_message_read($messageid, $timeread)   X-Ref
Mark a single message as read, trigger message_viewed event

param: int $messageid id of the message (in the message table)
param: int $timeread timestamp for when the message should be marked read
return: \core_external\external_description

mark_message_read_returns()   X-Ref
Returns description of method result value

return: \core_external\external_description

mark_notification_read_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

mark_notification_read($notificationid, $timeread)   X-Ref
Mark a single notification as read.

This will trigger a 'notification_viewed' event.

param: int $notificationid id of the notification
param: int $timeread timestamp for when the notification should be marked read
return: \core_external\external_description

mark_notification_read_returns()   X-Ref
Returns description of method result value

return: \core_external\external_description

mark_all_conversation_messages_as_read_parameters()   X-Ref
Mark all conversation messages as read parameters description.

return: external_function_parameters

mark_all_conversation_messages_as_read(int $userid, int $conversationid)   X-Ref
Mark all conversation messages as read function.

param: int $userid The user id of who we want to delete the conversation for
param: int $conversationid The id of the conversations

mark_all_conversation_messages_as_read_returns()   X-Ref
Mark all conversation messages as read return description.

return: external_warnings

delete_conversations_by_id_parameters()   X-Ref
Returns description of method parameters.

return: external_function_parameters

delete_conversations_by_id($userid, array $conversationids)   X-Ref
Deletes a conversation.

param: int $userid The user id of who we want to delete the conversation for
param: int[] $conversationids The ids of the conversations
return: array

delete_conversations_by_id_returns()   X-Ref
Returns description of method result value.

return: \core_external\external_description

delete_message_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

delete_message($messageid, $userid, $read = true)   X-Ref
Deletes a message

param: int $messageid the message id
param: int $userid the user id of who we want to delete the message for
param: bool $read if is a message read (default to true)
return: \core_external\external_description

delete_message_returns()   X-Ref
Returns description of method result value

return: \core_external\external_description

message_processor_config_form_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

message_processor_config_form($userid, $name, $formvalues)   X-Ref
Processes a message processor config form.

param: int $userid the user id
param: string $name the name of the processor
param: array $formvalues the form values
return: \core_external\external_description

message_processor_config_form_returns()   X-Ref
Returns description of method result value

return: \core_external\external_description

get_message_processor_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_message_processor($userid, $name)   X-Ref
Get a message processor.

param: int $userid
param: string $name the name of the processor
return: \core_external\external_description

get_message_processor_returns()   X-Ref
Returns description of method result value

return: \core_external\external_description

validate_preferences_permissions($userid)   X-Ref
Check that the user has enough permission to retrieve message or notifications preferences.

param: int $userid the user id requesting the preferences
return: stdClass full user object

get_preferences_structure()   X-Ref
Returns a notification or message preference structure.

return: external_single_structure the structure

get_user_notification_preferences_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_user_notification_preferences($userid = 0)   X-Ref
Get the notification preferences for a given user.

param: int $userid id of the user, 0 for current user
return: \core_external\external_description

get_user_notification_preferences_returns()   X-Ref
Returns description of method result value

return: \core_external\external_description

get_user_message_preferences_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_user_message_preferences($userid = 0)   X-Ref
Get the notification preferences for a given user.

param: int $userid id of the user, 0 for current user
return: \core_external\external_description

get_user_message_preferences_returns()   X-Ref
Returns description of method result value

return: \core_external\external_description

set_favourite_conversations_parameters()   X-Ref
Returns description of method parameters for the favourite_conversations() method.

return: external_function_parameters

set_favourite_conversations(int $userid, array $conversationids)   X-Ref
Favourite a conversation, or list of conversations for a user.

param: int $userid the id of the user, or 0 for the current user.
param: array $conversationids the list of conversations ids to favourite.
return: array

set_favourite_conversations_returns()   X-Ref
Return a description of the returns for the create_user_favourite_conversations() method.

return: \core_external\external_description

unset_favourite_conversations_parameters()   X-Ref
Returns description of method parameters for unfavourite_conversations() method.

return: external_function_parameters

unset_favourite_conversations(int $userid, array $conversationids)   X-Ref
Unfavourite a conversation, or list of conversations for a user.

param: int $userid the id of the user, or 0 for the current user.
param: array $conversationids the list of conversations ids unset as favourites.
return: array

unset_favourite_conversations_returns()   X-Ref
Unset favourite conversations return description.

return: \core_external\external_description

get_member_info_parameters()   X-Ref
Returns description of method parameters for get_member_info() method.

return: external_function_parameters

get_member_info(int $referenceuserid,array $userids,bool $includecontactrequests = false,bool $includeprivacyinfo = false)   X-Ref
Returns conversation member info for the supplied users, relative to the supplied referenceuserid.

This is the basic structure used when returning members, and includes information about the relationship between each member
and the referenceuser, such as a whether the referenceuser has marked the member as a contact, or has blocked them.

param: int $referenceuserid the id of the user which check contact and blocked status.
param: array $userids
return: array the array of objects containing member info.

get_member_info_returns()   X-Ref
Get member info return description.

return: \core_external\external_description

get_conversation_counts_parameters()   X-Ref
Returns description of method parameters for get_conversation_counts() method.

return: external_function_parameters

get_conversation_counts(int $userid)   X-Ref
Returns an array of conversation counts for the various types of conversations, including favourites.

Return format:
[
'favourites' => 0,
'types' => [
\core_message\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,
\core_message\api::MESSAGE_CONVERSATION_TYPE_GROUP => 0
]
]

param: int $userid the id of the user whose counts we are fetching.
return: array the array of conversation counts, indexed by type.

get_conversation_counts_returns()   X-Ref
Get conversation counts return description.

return: \core_external\external_description

get_unread_conversation_counts_parameters()   X-Ref
Returns description of method parameters for get_unread_conversation_counts() method.

return: external_function_parameters

get_unread_conversation_counts(int $userid)   X-Ref
Returns an array of unread conversation counts for the various types of conversations, including favourites.

Return format:
[
'favourites' => 0,
'types' => [
\core_message\api::MESSAGE_CONVERSATION_TYPE_INDIVIDUAL => 0,
\core_message\api::MESSAGE_CONVERSATION_TYPE_GROUP => 0
]
]

param: int $userid the id of the user whose counts we are fetching.
return: array the array of unread conversation counts, indexed by type.

get_unread_conversation_counts_returns()   X-Ref
Get unread conversation counts return description.

return: \core_external\external_description

delete_message_for_all_users_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

delete_message_for_all_users(int $messageid, int $userid)   X-Ref
Deletes a message for all users

param: int $messageid the message id
param: int $userid the user id of who we want to delete the message for all users, is no longer used.
return: \core_external\external_description

delete_message_for_all_users_returns()   X-Ref
Returns description of method result value

return: \core_external\external_description