Support chat backgrounds

This commit is contained in:
N Pex 2023-10-18 15:05:50 +00:00
parent ea8522d8a3
commit 4e9aecc304
4 changed files with 97 additions and 56 deletions

View file

@ -59,5 +59,18 @@ The app loads runtime configutation from the server at "./config.json" and merge
* Insert the resulting config blob into the "shortCodeStickers" value of the config file (assets/config.json)
* Rearrange order of sticker packs by editing the config blob above.
### Chat backgrounds
Chat backgrounds can be set using the **chat_backgrounds** config value. It can be set per room type, "direct", "invite" and "public". If no background is set for the current room type, the app will also check if a default "all" value has any backgrounds specified.
Backgrounds are entered as an array. Which of the backgrounds in the array is used for a given room is calculated from the room ID, so that it is constant across the lifetime of the room.
```
chat_backgrounds: {
"direct": ["https://example.com/dm1.png", "data:image/png;base64,yadiyada..."],
"all": ["/default_background.png"]
}
```
### Attributions
Sounds from [Notification Sounds](https://notificationsounds.com)