There should be a clear action at course level user profile level, that takes the user to a direct chat with the user the Moodle profile relates to.
This action should follow the default behavior of Matrix when you message an individual the first time. Where the user being messaged must accept the invitation from the user contacting them
It needs to be determined with UX consultation how the behavior of clicking this action will work. There is also consideration about if the user is accessing Moodle via a web browser or by the Moodle mobile app. When designing the UI for this, we also need to design with future continuity/consistency in mind - in future, there is a possibility that a user will have multiple communication options to choose from (either multiple options for one tool, such as message/video, or multiple tools, such as Matrix and Teams).
It makes sense that if the organisation has a Matrix web client available, this should open in a separate web browser tab and the user be taken to that.
If Moodle can determine that a user has a Matrix client such as Element installed as an app (and we support the use of a dedicated app) we could also direct the user to that.
Using the Matrix API we should be able to determine if the user has ever accessed the organisation's Matrix before or not.
It would be worth exploring in depth what we can do on the Moodle side to make this workflow as easy as we can for users.
- As a student I want to be able to contact one of my peers using Matrix from their user profile page in Moodle. So I can chat directly to them.
- As a teacher I want to be able to contact one of my peers using Matrix from their user profile page in Moodle. So I can chat directly to them.