Meeds-io / MIPs

The Meeds Improvement Proposal repository
0 stars 0 forks source link

Matrix server and chat drawer revamping #163

Open Julien-Dubois-eXo opened 1 day ago

Julien-Dubois-eXo commented 1 day ago

Rationale

The technical components supporting the Chat feature are old and do not allow integration with modern chat clients. The current chat drawer does not provide modern UI and UX. End users are disappointed with the user experience compared to the pure players in daily life (What's app, Messenger, etc).

1. Functional Requirements

Top User Stories

P1 - Data storage

P1 - Conversation list

P1 - Conversation

P2 - emoji reaction on a message

P2 - Quick actions on conversation list

P2 - Interaction on push notification

P2 - Conversation actions

P2 - Quick filter conversation

Impacts

Gamification

No impact

Notifications

Analytics

Measuring point "Send a message" to be adapt to track the actions on the new drawer.

Unified Search

2. Technical Requirements

Expected Volume & Performance

Security

Authentication & Authorizations Matrix is an external server that provides APIs to interact with. All communication (API calls) should be secured with a token related to a user session. This session should be active (Not expired, not logged out, etc ...)

For the integration with eXo platform, we will need to authenticate the user to Matrix server and get the access_token that will be used later to authenticate API calls

Administrative actions : This will require an access_token that could be generated once (session never expires). This token will be registered on server side using a System property. It could be improved to be registered using an administration UI. User actions : This requires that the user log into eXo platform and into Matrix simultaneously to get a fresh access token, and use it for the different user action during a chat session. This token will be registered on the browser storage and should be be expired/removed when the eXo platform session is expired. Generating the access_token could be done with one of the following authentication methods : Login/password : An additional login page from within eXo platform should be used to retrieve the access_token after a successful login of the user SSO : Using a common SSO mechanism by eXo platform and Synapse (Matrix) to ensure sharing authentication tokens

Data retention : Each message should be kept for 1 year, This could be done using a server configuration

Extensibility

It is needed to add an extension point that could be used for displaying Call actions (Jitsi, etc ...) and other possible actions on the head of conversation

Configurability

New configuration introduced for :

exo.matrix.server.url : Matrix Server URL exo.matrix.access_token : Administrator account access_token exo.matrix.shared_secret_registration : the registration token is named shared_secret_registration , it is used for creating new user accounts from eXo inside Matrix server.

Upgradability

Upgrading data from the old eXo platform chat to Matrix is not possible. It requires loading all chat messages from all existing rooms and then impersonate each user to send his messages instead of him using his account (Impersonation) which is not allowed by secured systems.

If the old chat messages is important, a functional procedure should be performed to restore all needed data before shutting down the old chat system.

Existing Features

Feature Flags

The Matrix addon will be a new addon that will have its own version history, thus we may install it whenever we want. No feature flag needed.

Other Non Functional Requirements

3. Impacts

Documentation

Installation guides should be updated for instructions to install the Matrix stack.

Training

No

4. Software Architecture

Security

Access

All HTTP Requests sent to the Matrix server should contain the access_token as a header to identify the user and get the right ACL

Services & processing

Data and persistence

Clustering

N/A

Multitenancy

N/A

Integrations

N/A

Migration strategy

N/A

5. Annexes

plamarque commented 1 day ago

Rationale

The technical components supporting the Chat feature are old and do not allow integration with modern chat clients.
The current chat drawer does not provide modern UI and UX. End users are disappointed with the user experience compared to the pure players in daily life (What's app, Messenger, etc).

The rationale is written from the perspective of eXo. In meeds there is no chat, so the rationale must be different. . Reasons for willing a chat in meeds are mainly for providing a real time conversation that is inexistant to date. Reasons for using Matrix protocol may be interoperability and the availability of bridges with popular chat services such as Discord. Please rewrite.

Top User Stories

except for the data storage, all stories describe the UI with text. Please include mockups for easier review.

user stories as described do not allow to understand where the feature is inserted nor what persona is involved I see nothing regarding spaces integration, nor sync of members versus matrix rooms. I see nothing regarding settings of the chat.

Configurability

exo.matrix.server.url : Matrix Server URL
exo.matrix.access_token : Administrator account access_token
exo.matrix.shared_secret_registration : the registr
srenault-meeds commented 1 day ago

I confirm. Let's discuss about it @Julien-Dubois-eXo as soon as you can of course

Julien-Dubois-eXo commented 1 day ago

It's normal I just do a copy/paste of the eIP to to have a base to discuss. I want to check some points with you @srenault-meeds before I submit it for review.