MDL-64167 core_message: get_conversations() handles self conversations
authorJake Dallimore <jake@moodle.com>
Fri, 23 Nov 2018 04:28:06 +0000 (12:28 +0800)
committerJake Dallimore <jake@moodle.com>
Mon, 26 Nov 2018 00:52:54 +0000 (08:52 +0800)
commitcb38961988473decaca3a18a10b42a8aad0dcb5c
tree92824739917a69a8393d9876f5056bef087d04d6
parentad5de40c497b07399d96a93653c6cc1da439ff7d
MDL-64167 core_message: get_conversations() handles self conversations

Those individual conversations created with one's self (via admin user
bulk actions) are now supported in get_conversations(). These had two
records with the same userid in the message_conversation_members table.
The following adjustments have been made to accomodate these:
- Member count adjusted to read 1, not 2 for 'self' conversations.
- Member information for the current user now returned for 'self'
conversations.
- The method now tracks 'self' conversations via $selfconversations.
message/classes/api.php