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 #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gaurav-handysolver
Copy link
Collaborator

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

#9

@gaurav-handysolver gaurav-handysolver added api Issues to update existing endpoints or to add new ones core Adjustments of the HumHub core labels Jun 13, 2022
@gaurav-handysolver gaurav-handysolver self-assigned this Jun 13, 2022
@donni106 donni106 added this to the 0.5 milestone Jun 16, 2022
@donni106 donni106 linked an issue Jun 16, 2022 that may be closed by this pull request
@donni106
Copy link
Member

I rebased issue-9 on main and will check in detail now.

Events.php Show resolved Hide resolved
@gaurav-handysolver
Copy link
Collaborator Author

Hi @donni106
New endpoint /setting/notification is now done. The list of all notification settings will be shown (see the attached screenshot below)

image

Note: You have to pass JWT token to get the notification setting list of the user.

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
Note: you have to pass JWT token to get the notification setting list of the user

# Conflicts:
#	docs/postman/Smart Village API.postman_collection.json
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
Development

Successfully merging this pull request may close these issues.

Add settings endpoint for web/push and e-mail notifications
2 participants