Skip to content

Commit

Permalink
MDL-63547 core_message: deprecate delete_conversation web service
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Oct 17, 2018
1 parent 15663b0 commit fa02482
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lib/db/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,8 @@
'classname' => 'core_message_external',
'methodname' => 'delete_conversation',
'classpath' => 'message/externallib.php',
'description' => 'Deletes a conversation.',
'description' => '** DEPRECATED ** Please do not call this function any more.
Deletes a conversation.',
'type' => 'write',
'capabilities' => 'moodle/site:deleteownmessage',
'ajax' => true,
Expand Down
13 changes: 12 additions & 1 deletion message/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2541,6 +2541,7 @@ public static function mark_all_messages_as_read_returns() {
/**
* Returns description of method parameters.
*
* @deprecated since 3.6
* @return external_function_parameters
* @since 3.2
*/
Expand All @@ -2556,6 +2557,7 @@ public static function delete_conversation_parameters() {
/**
* Deletes a conversation.
*
* @deprecated since 3.6
* @param int $userid The user id of who we want to delete the conversation for
* @param int $otheruserid The user id of the other user in the conversation
* @return array
Expand Down Expand Up @@ -2609,6 +2611,7 @@ public static function delete_conversation($userid, $otheruserid) {
/**
* Returns description of method result value.
*
* @deprecated since 3.6
* @return external_description
* @since 3.2
*/
Expand All @@ -2621,6 +2624,15 @@ public static function delete_conversation_returns() {
);
}

/**
* Marking the method as deprecated.
*
* @return bool
*/
public static function delete_conversation_is_deprecated() {
return true;
}

/**
* Returns description of method parameters
*
Expand Down Expand Up @@ -3017,7 +3029,6 @@ public static function get_user_notification_preferences_returns() {
);
}


/**
* Returns description of method parameters
*
Expand Down
7 changes: 4 additions & 3 deletions message/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ information provided here is intended especially for developers.
* The method \core_message\api::can_delete_conversation() now expects a 'conversationid' to be passed
as the second parameter.
* The following web services have been deprecated. Please do not call these any more.
- core_message_external::block_contacts, please use core_message_external::block_user instead.
- core_message_external::unblock_contacts, please use core_message_external::unblock_user instead.
- core_message_external::create_contacts, please use core_message_external::create_contact_request instead.
- core_message_external::block_contacts(), please use core_message_external::block_user() instead.
- core_message_external::unblock_contacts(), please use core_message_external::unblock_user() instead.
- core_message_external::create_contacts(), please use core_message_external::create_contact_request() instead.
- core_message_external::delete_conversation(), please use core_message_external::delete_conversation_by_id() instead.

=== 3.5 ===

Expand Down

0 comments on commit fa02482

Please sign in to comment.