digitalfabrik / integreat-app

React JS and React Native App for Integreat
https://integreat.app
MIT License
46 stars 15 forks source link

Show chat depending on feature flag #2800

Closed steffenkleinle closed 1 month ago

steffenkleinle commented 4 months ago

Is your feature request related to a problem? Please describe. As a city/migration counselor I only want to show the chat to users if I have enabled the feature. As this is a prototype, I don't want every user to see this and instead only a specific percentage of users.

Describe the solution you'd like The feature should only be shown if the feature flag in the region endpoint is enabled AND the is_chat_enabled_for_user endpoint returns true. For details see https://github.com/digitalfabrik/integreat-cms/pull/2846#pullrequestreview-2122440717

Describe alternatives you've considered Show to all users if the feature flag is enabled.

Additional context Mattermost discussion Part of #2797.

steffenkleinle commented 3 months ago

Probability will be implemented in the backend including storing who got shown the chat before and who did not. Therefore, we have to check the feature flag and query the corresponding new endpoint.

steffenkleinle commented 1 month ago

Already done.