Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web server for multi-user sticker picker #7

Open
tulir opened this issue Sep 5, 2020 · 10 comments
Open

Web server for multi-user sticker picker #7

tulir opened this issue Sep 5, 2020 · 10 comments
Labels
enhancement New feature or request

Comments

@tulir
Copy link
Member

tulir commented Sep 5, 2020

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.

@tulir tulir added the enhancement New feature or request label Sep 5, 2020
@Bubu
Copy link

Bubu commented Sep 5, 2020

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>

@a22sc
Copy link

a22sc commented Nov 26, 2020

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;
  }

@LuckyTurtleDev
Copy link

msrd0/docker-stickerpicker does also support multiple profiles

@FulytheFox
Copy link

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:

stickerpicker_edit_visibility_concept.mp4

lxndrbnsv added a commit to lxndrbnsv/stickerpicker that referenced this issue May 10, 2023
@MattyBoombalatty
Copy link

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?

@sebix
Copy link

sebix commented Jul 24, 2024

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?

I'm using https://heptapod.host/intevation/fac/synapse-modules#static-account-data for this purpose

@MattyBoombalatty
Copy link

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?

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.

@sebix
Copy link

sebix commented Jul 24, 2024

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)

@MattyBoombalatty
Copy link

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.

@MattyBoombalatty
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants