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

fix: ensure notification preferences JSON is parsed correctly #30

Merged
merged 11 commits into from
Apr 8, 2024
Merged

fix: ensure notification preferences JSON is parsed correctly #30

merged 11 commits into from
Apr 8, 2024

Conversation

stigi
Copy link
Member

@stigi stigi commented Apr 3, 2024

Important

This PR is stacked on the following PRs which need to get merged before this one:

What's in this PR?

This PR updates the client side implementation of the notifications preferences endpoint, according to the docs.

This required changing the user.preferences api, as the shape of the returned objects changed.

Since the API and the object model changed I took the chance to also update the model names from UserPreferences to NotificationPreferences which is more in line with the (current) reality.

Test Plan

Added unit tests for decoding and encoding JSON structure. Tested with the example that was provided in #27

In addition I tested the functionality of user.preferences.fetch and user.preferences.update against the live API and could retrieve and update preferences for the user in the example app (a user that defaulted to the v1 shape of the notification_preferences endpoint)

stigi added 10 commits April 3, 2024 20:28
from v9.2.1 to v12.3.0 with support for the current Xcode (15.2)

I was not able to bump it up to the very latest Nimble version (13.2.x) because I started running into this Quick/Nimble#992

This was likely caused by: Quick/Nimble#1108
The previous version didn't support the latest Xcode 15 and produced the following errors:
@stigi stigi marked this pull request as ready for review April 6, 2024 20:24
@unamashana unamashana requested a review from smeijer April 8, 2024 09:53
@smeijer smeijer changed the title Fixing Notification Preferences JSON Parsing fix: ensure notification preferences JSON is parsed correctly Apr 8, 2024
@smeijer smeijer merged commit f104381 into magicbell:main Apr 8, 2024
@stigi stigi deleted the ullrich/test-userpreferences branch April 8, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants