Currently the app schedules two local notifications (search sendNotificationWithTitlefor these placements in the codebase):
- One is an "edit reverted" notification that it parses from polling and persisting the echo notifications API via RemoteNotificationsController.
- The other is an "in the news" notification that is parsed and presented from our standard Explore feed controllers (WMFFeedContentSource.m) if there's a news event.
For edit reverted, we only want to show one notification per wiki language, regardless of variant.
For in the news, we want to show the wiki news notification for every variant the user has selected.
Note for #1, we do have a current bug in main, with variants enabled, when trying to fetch the notifications API. The app is sending in the full variant language code, causing a warning in the API response:
Response:
{ "batchcomplete": true, "warnings": { "notifications": { "warnings": "Unrecognized values for parameter \"notwikis\": zh_hantwiki, sr_ecwiki" } }, "limits": { "notifications": 50 }, "query": { "notifications": { "list": [ { "wiki": "enwiki", "id": 193808332, "type": "edit-user-talk", "category": "edit-user-talk", "section": "alert", "timestamp": { "utciso8601": "2020-06-29T16:31:22Z", "utcunix": 1593448282, "unix": "1593448282", "utcmw": "20200629163122", "mw": "20200629163122", "date": "29 June" }, ... }