Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-63311

Messaging: Audit message API to confirm level of support for group conversations

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Deferred
    • Icon: Blocker Blocker
    • None
    • 3.6
    • Messages

      Background:
      Currently, message_send (in messagelib.php) and send_message (in lib/classes/message/manager.php) support 1:1 messaging. See: 'userto' and 'userfrom' used there. The table structure was re-worked to support group conversations (more than 2 users in a conversation - nothing to do with course groups here), but I'm not sure if the APIs all support sending messages in conversations like this. Certainly the unit tests seem to only test 1:1 conversations.

      I'm also not sure whether the conversation creation code supports groups of more than 2 members, or whether we can create a conversation without an initial message being sent (which we'll perhaps need so we can fetch conversation details for the initial UI load - depending how we end up doing that bit)

      Scope:

      • Investigate message_send and send_message and check whether it's possible to send messages to a conversation using existing APIs. 
      • Check also any other conversation creation code
      • If the above is missing/incomplete: we will either need to update, or create new API allowing us to send a message to all members of a conversation.
        • We may be better off creating a new API allowing us to do this by conversation as with groups of 3+ we're not sending a message to a single user any more - needs investigation anyway.
      • We should provide APIs to create conversations (collections of members), WITHOUT the need to send an initial message.
      • We should add unit tests to message/tests/api_test.php to cover conversations with more than just 2 users to make sure everything works as expected.
        • Create conversation (can we create a conversation without an initial message - this is important!)
        • Send messages to conversaton
        • Unread counts for all users in the conversation (message_unread table from memory)

            markn Mark Nelson
            jaked Jake Dallimore
            Jake Dallimore Jake Dallimore
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 days
                4d
                Remaining:
                0m
                Logged:
                Time Not Required
                Not Specified

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.