stickerpicker
stickerpicker copied to clipboard
Web server for multi-user sticker picker
Currently the picker is just some static files, which means everyone has the same packs and they can only be configured server-side.
The project could include a simple web server which can serve different packs for different users, based on some identifier in the picker URL. Once that server exists, it could also have a bot or other interface that users can use to add packs to their own picker.
It shouldn't have any auth other than the unique ID in the URL, as widget authentication is a mess that's different on all platforms.
As an alternative to including a webserver the potential bot could also provision all required static files into some subdir scheme like:
<webroot>/stickerpicker-user1-randomid/<stickerpicker-webdir>
<webroot>/stickerpicker-user2-randomid/<stickerpicker-webdir>
I copied ./web/packs/index.json to index_h6wxarlac.json, deleted the packs in the file, I don't want to give to the user and added the following lines to the server {} in nginx.conf
location /h6wxarlac {
alias /opt/stickerpicker/web;
try_files $uri $uri/ =404;
}
location /h6wxarlac/packs/index.json {
alias /opt/stickerpicker/web/index_h6wxarlac.json;
try_files $uri $uri/ =404;
}
msrd0/docker-stickerpicker does also support multiple profiles
I would suggest adding an "Edit Visibility" button to the settings section so users can decide wich packs are visible to them. When the button is pressed, the window goes into an "edit mode" where packs can be enabled or disabled with a switch, just like in Dimension. The state could also be saved in the local storage like the other settings.
Here I made a small visual concept of how this idea could look in the UI:
https://user-images.githubusercontent.com/37185496/205553080-4554ad1a-6ec1-4c85-bc52-eb2c63044520.mp4
Is it possible to add the sticker picker for all users or do they all have to add it to their m.widgets event in the devtools?
Is it possible to add the sticker picker for all users or do they all have to add it to their
m.widgetsevent in the devtools?
I'm using https://heptapod.host/intevation/fac/synapse-modules#static-account-data for this purpose
Is it possible to add the sticker picker for all users or do they all have to add it to their
m.widgetsevent in the devtools?I'm using https://heptapod.host/intevation/fac/synapse-modules#static-account-data for this purpose
Does that automatically update existing user data, or is it necessary to have them change something about their profile before that's applied? Thanks.
Does that automatically update existing user data, or is it necessary to have them change something about their profile before that's applied? Thanks.
No, it's not applied to all existing users. You need to do that by other means (I'm sure I did that my self, but don't remember the details)
Does that automatically update existing user data, or is it necessary to have them change something about their profile before that's applied? Thanks.
No, it's not applied to all existing users. You need to do that by other means (I'm sure I did that my self, but don't remember the details)
Understood. Thanks for the help. If you do happen to remember what you did, please let me know.
A cursory glance in the account_data table indicates that user account data would have to be manually set with a randomly generated UUID, followed by the rest of the JSON.