WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

Reader: Can't enable in-app notifications on some posts

Open rachelmcr opened this issue 3 years ago • 2 comments

Expected behavior

I expected to be able to enable in-app notifications on any posts in the Reader.

Actual behavior

When I try to enable in-app notifications on some posts, the toggle immediately toggles off. I noticed it happening on a blog (internal p2) where I already follow all posts and comments via email.

The app logs show the following:

2022-07-01 12:57:21:712 🔵 Tracked: reader_toggle_comment_notifications <blog_id: 208157483, default_tab_experiment: dashboard, notifications_enabled: 1, source: reader_post_details_comments, subscription_count: 96>
2022-07-01 12:57:22:037 Error updating notification settings for followed conversation: Optional((extension in WordPressKit):__C.ReaderPostServiceRemote.ResponseError.decodingFailed)
2022-07-01 12:57:22:038 Reader Comments: error toggling notification status: Optional((extension in WordPressKit):__C.ReaderPostServiceRemote.ResponseError.decodingFailed))

Steps to reproduce the behavior

  1. Follow all posts and comments on a blog (this can be adjusted in the following settings in https://wordpress.com/following/manage)
  2. Find a post from that blog in the Reader.
  3. At the bottom of the post detail, tap the bell icon.
  4. In the bottom sheet, toggle on "Enable in-app notifications".
  5. Notice the setting immediately toggles off. When you close the bottom sheet, a notice appears with the error "Could not enable notifications"
Tested on iPhone 12 Mini, iOS 15.5, Jetpack app 20.0.1

rachelmcr avatar Jul 01 '22 12:07 rachelmcr

This issue likely isn't relevant anymore. The bell icon is removed. Similar functionality exists through "Subscribe" button and following the toast's enable button works fine. Pinged @dvdchr just to be safe.

EDIT: I misunderstood the issue before. The bug remains and needs a fix.

alpavanoglu avatar Mar 08 '24 11:03 alpavanoglu

The culprit is the remoteReceivesNotifications we receive as response in ReaderPostServiceRemote. It returns false even though the notifications are enabled from the Web. This causes the remoteReceivesNotifications == receiveNotifications comparison to fail as the local value is true

alpavanoglu avatar Mar 11 '24 08:03 alpavanoglu

Fixed in https://github.com/wordpress-mobile/WordPress-iOS/pull/24135. This button should not be visible for P2s with the global "Email me new comments" enabled.

kean avatar Feb 28 '25 21:02 kean