MDL-36941 core_message: added details to upgrade.txt

This commit is contained in:
Mark Nelson 2018-01-24 17:33:24 +08:00
parent 2ccbb8ed62
commit d0d1e97ab6

View File

@ -1,6 +1,46 @@
This files describes API changes in /message/ messaging system,
information provided here is intended especially for developers.
=== 3.5 ===
* Changed the database structure so there are no longer two tables for messages, with the only
difference being that one stores read messages. The 'message' and 'message_read' tables are
still present in core but will no longer be populated by core APIs. The data will be
transferred to the new database structure via an ad-hoc task. Please be patient. This can
take time.
The new database structure is as follows -
'messages' - Stores the messages with a 'useridfrom' field specifying the user who sent the
message and a 'conversationid' field specifying which conversation it is for.
'message_conversations' - The list of conversations.
'message_conversation_members' - The list of users in each conversation.
'message_user_actions' - The list of user actions against a message, eg. read/deleted.
'notifications' - This has a very similar structure to the old table 'message' and still
has a one-to-one relation between users.
Due to these huge differences the events message_sent, message_deleted and message_viewed
have changed quite a lot. Please, if you have any observers or are triggering these events
in your code you will have to make some changes!
* The webservice external function 'core_message_mark_message_read' now only marks messages as
read, and not notifications. A new external function 'core_message_mark_notification_read' was
added to mark notifications as read.
* Deprecated the following functions.
- message_move_userfrom_unread2read
- message_get_blocked_users
- message_get_contacts
- message_mark_message_read
- message_can_delete_message
- message_delete_message
- \core_message\api::mark_all_read_for_user
Please see their declaration in lib/deprecatedlib.php to view their alternatives (if applicable).
* Final deprecation of the following functions.
- message_get_recent_notifications
- message_search
- message_get_history
- message_get_recent_conversations
* Added new events for when a notification is sent and viewed.
* Removed the database tables 'message_popup' and 'message_working'. The 'message_working' table was introduced when
the messaging system was first introduced in Moodle, so, a long time ago. It served no real purpose. The
'message_popup' table is also no longer necessary now we have a separate table for notifications.
=== 3.2 ===
* Removed all message_print_* functions as well as the files search.html, search_advanced.html and