Managing avatar media
These are the matrix API call step to deploy avatar:
- Upload image to media API (Matrix-media-repo)
- Get the mxc url from the response (i.e: mxc://matrix-media-repo.eclipse.org/XXXXXXXXXXXXXXXXXXXXXXXXX")
- Request an Avatar event (/rooms/$roomId/state/m.room.avatar)
The problem is where to store media and what data to configure (mxc url or basic url)?
IMPORTANT: Consider media configuration only as an URL, due to the nature of the project deployment as a batch (tanka, kubernetes). Local path can't be a solution.
Possibilities:
1- Allow moderators to manage avatar
Change project.yaml
configuration: (current value is 55)
m.room.avatar: 50
Pros:
- we consider the script does not manage avatar
Cons
- more permission for moderator
See: User custom power level for room/space moderation
2- Store media in a different git repository
Create a new repository with branches by environment. For a new avatar, a MR is created, and merge in the right environment.
Pro:
- gitlab url can be reference in project.yaml
Cons:
- Need to create branch by environment
- MR must be merge in order to refence the right url in the project.yaml configuration file
- Create another repository of media dedicated to chat service instead of using a transversal eclipse media repository.
3- Store media in a artifacts repository
Create a new repository with. New avatar are uploaded with a version in a structure repository.
Pro:
- artifact url can be reference in
project.yaml
Cons:
- repo.eclipse.org based on nexus 2 support only maven format!
https://gitlab.eclipse.org/eclipsefdn/it/releng/chat-service/synapse)
4- Store medias in the synapse repository (Not possible!
Many problems:
- Impossible to reference local file, only URL
- If a MR is created for a new room/space, and if avatar reference is an URL, the branch name must be part of the URL which is a problem after merging branch on
main
.