Skip to:
Content

BuddyPress.org

Opened 20 months ago

Last modified 12 days ago

#8774 assigned feature request

Add ability to change Email notification settings via REST API

Reported by: niftythree's profile niftythree Owned by: espellcaste's profile espellcaste
Milestone: 15.0.0 Priority: high
Severity: normal Version: 10.6.0
Component: REST API Keywords: needs-patch has-dev-note
Cc:

Description

Hi,

We have an app in which members sometimes have lengthy private message conversations; some members may have 300+ messages within a single thread. We will be utilising Firebase notifications to send app users notifications of new private messages. The combination of Firebase notifications and email notices means that app users get multiple notifications of each new private message. We could disable the email notices, however, we also have a cohort of users who only use our website, and therefore rely on the email notices.

If possible, it would be great to have the ability to allow app users to update their email notice/notification settings through the REST API. This would also allow us to set email notifications off by default for users who log in through the app (but users could then turn it back on, if they wish). This would be more convenient for app users, but also would also reduce the volume of emails going out, keeping email providers happier.

Please let us know if the ability to do this already exists and we've overlooked it.

Thanks.

Change History (9)

#1 @espellcaste
19 months ago

  • Milestone changed from Awaiting Review to Up Next

#2 @imath
19 months ago

  • Milestone changed from Up Next to 12.0.0

#3 @imath
12 months ago

  • Keywords needs-patch added
  • Milestone changed from 12.0.0 to Up Next

Hi @niftythree

It doesn't exist, but I believe we should do it. I've opened an issue on the BP REST GitHub repository: https://github.com/buddypress/BP-REST/issues/488

Let's try to implement it during next release. (sorry we didn't find the time during 12.0 dev. cycle).

#4 @niftythree
12 months ago

Thanks for the update, @imath.
Thanks to all for the continued work. 🙂

#5 @imath
7 months ago

  • Milestone changed from Up Next to 14.0.0

#6 @espellcaste
6 months ago

  • Owner set to espellcaste
  • Status changed from new to assigned

I plan to work on this feature.

#7 @espellcaste
5 months ago

Related to #6712 and #8997

I actually think we should create a settings endpoint. And from this endpoint, a user can update their notification settings for each core or custom component. See #6712

Last edited 5 months ago by espellcaste (previous) (diff)

#8 @espellcaste
3 months ago

  • Keywords has-dev-note added
  • Milestone changed from 14.0.0 to Up Next
  • Priority changed from normal to high
  • Type changed from enhancement to feature request

I'd like to propose we punt this ticket a bit more because there are several unkowns here that increases the possibility of building something that might introduce a breaking change later. And since this is the REST API, it is more problematic (the sames problems here would affect the BP CLI API or the GraphQL API).

Adding an endpoint to update the email notifications is straightforward. But there are a few reasons or things we need to iron out first:

  • The shape/schema of this endpoint can change considerably via #6712;
  • We need to approach this via a "global" settings endpoint with child endpoints:
https://wp.test/wp-json/buddypress/v1/settings/notifications
https://wp.test/wp-json/buddypress/v1/settings/profile
https://wp.test/wp-json/buddypress/v1/settings/general
...
  • Ideally, the content of the settings would reflect the one in the site. But currently, this information is hardcoded in template files. There is no API to fetch it. That would force consumers to add it by hand. See

That includes to the data location. See

We need something like the Components component, where one can get the data of the component easily (without being saved in the database). See.

  • Support for plugins and developers to modify or add new sections. #6712 should take care of that. Or see how bp_core_get_components handles it.

For this reason, I'm punting this ticket to the next version together with #6712

#9 @imath
12 days ago

  • Milestone changed from Up Next to 15.0.0
Note: See TracTickets for help on using tickets.