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

Add settings endpoint for web/push and e-mail notifications #9

Open
donni106 opened this issue Apr 13, 2022 · 9 comments · May be fixed by #31
Open

Add settings endpoint for web/push and e-mail notifications #9

donni106 opened this issue Apr 13, 2022 · 9 comments · May be fixed by #31
Assignees
Labels
api Issues to update existing endpoints or to add new ones core Adjustments of the HumHub core
Milestone

Comments

@donni106
Copy link
Member

donni106 commented Apr 13, 2022

HumHub provides settings per user for e-mail notification, which can be edited in the web:

Bildschirmfoto 2022-04-13 um 17 03 08

We need /settings endpoints to list and update settings for e-mail notifications.

@donni106 donni106 added api Issues to update existing endpoints or to add new ones core Adjustments of the HumHub core labels Apr 13, 2022
@donni106 donni106 added this to the 0.5 milestone May 23, 2022
@gaurav-handysolver
Copy link
Collaborator

Hi @donni106
We have a doubt
Do You need only e-mail notification setting update endpoint or you need both (web and e-mail notification)?
Thanks!

@donni106
Copy link
Member Author

donni106 commented Jun 7, 2022

For now it would be email only.
But to tell you the bigger plan, we will integrate push notifications in our mobile app. Users should also be able to decide what to be notified about per push. We do not need the web notifications, so we thought about re-using the "web" part for "push" later. At the end our API and endpoints should also be able to handle settings for web/push. Is it easier for you to consider email + web/push together now instead of making it separately - email now and web/push later?
Our push server will process the web/push settings in the future. Is it possible to rename the "Web" to "Push" in the web interface of settings?

@gaurav-handysolver
Copy link
Collaborator

Hi @donni106
We can implement both email + web setting together as well as separate.
Thanks!

@donni106
Copy link
Member Author

donni106 commented Jun 7, 2022

All right, I will talk to my colleagues about a decision.

And what about the second question?

Our push server will process the web/push settings in the future. Is it possible to rename the "Web" to "Push" in the web interface of settings?

@gaurav-handysolver
Copy link
Collaborator

Hi @donni106
You can change text from web to push. there is a class WebTarget.php in humhub/modules/notification/targets. In this class there is function 'getTitle()' where we defined text.
image

image

@gaurav-handysolver
Copy link
Collaborator

Hi @donni106
Do you want to update these settings also.

image

@donni106
Copy link
Member Author

donni106 commented Jun 8, 2022

Do you want to update these settings also.

we do not need the checkbox about desktop notifications.
but the ability to select spaces to be notified on new content should be implemented in the api please.

@gaurav-handysolver
Copy link
Collaborator

Hi @donni106
We will Implemented that in API.
Thanks!

@donni106
Copy link
Member Author

donni106 commented Jun 8, 2022

We can implement both email + web setting together as well as separate.

please do it together directly. so we will be able to change settings for web/push and email.

@donni106 donni106 changed the title Add settings endpoint for e-mail notifications Add settings endpoint for web/push and e-mail notifications Jun 8, 2022
gaurav-handysolver added a commit that referenced this issue Jun 13, 2022
We are updated space, email and web notification setting

Working flow of space notification setting

1. Pass space id in body data for adding space in space notification.
2. If user is the member of that space only then space is added for the user.
3. Otherwise, it will throw an error.
4. In other word, if user status will be 1(invited) or 2(applicant) for that space ,it will throw an error

Working flow of email notification setting
1. pass the email key name with status (true/false) to update the email notification setting
2.  Check the module is active or not
3. Check the key value is disabled or not (which mean check we can update the value or not)
4. Validate the input values (that is only true,false ,0 and 1 are accepted)
5. Update the email notification setting

Same working flow for web notification also
donni106 pushed a commit that referenced this issue Jul 22, 2022
We are updated space, email and web notification setting

Working flow of space notification setting

1. Pass space id in body data for adding space in space notification.
2. If user is the member of that space only then space is added for the user.
3. Otherwise, it will throw an error.
4. In other word, if user status will be 1(invited) or 2(applicant) for that space ,it will throw an error

Working flow of email notification setting
1. pass the email key name with status (true/false) to update the email notification setting
2.  Check the module is active or not
3. Check the key value is disabled or not (which mean check we can update the value or not)
4. Validate the input values (that is only true,false ,0 and 1 are accepted)
5. Update the email notification setting

Same working flow for web notification also
donni106 pushed a commit that referenced this issue Jul 26, 2022
We are updated space, email and web notification setting

Working flow of space notification setting

1. Pass space id in body data for adding space in space notification.
2. If user is the member of that space only then space is added for the user.
3. Otherwise, it will throw an error.
4. In other word, if user status will be 1(invited) or 2(applicant) for that space ,it will throw an error

Working flow of email notification setting
1. pass the email key name with status (true/false) to update the email notification setting
2.  Check the module is active or not
3. Check the key value is disabled or not (which mean check we can update the value or not)
4. Validate the input values (that is only true,false ,0 and 1 are accepted)
5. Update the email notification setting

Same working flow for web notification also
@donni106 donni106 modified the milestones: 0.5, 0.6 Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues to update existing endpoints or to add new ones core Adjustments of the HumHub core
Projects
None yet
2 participants