Adjust Messaging API for integrating SDK
Background / User story
Integrating the SDK in #972 (closed) will lead to some changes to the Messaging API, which we can apply already beforehand.
What to change
- Design: N/A
- Research: N/A
- Spec: N/A
- Legal: N/A
-
Development:
- Make the following adjustments to the Messaging API:
- app.get: Add support for "acceptableAdsUrl" and "acceptableAdsPrivacyUrl" values to retrieve the respective subscription URL from the background page.
- filter.get: Make "subscriptionUrl" parameter optional and only return custom filters, if none is passed.
- filters.getTypes: Stop omitting OTHER type.
- filters.importRaw: Remove unused "removeExisting" parameter.
-
filters.listen:
- Rename "disabled" event to "changed".
- Remove "loaded" event.
- filters.remove: Remove unused "index" and "subscriptionUrl" parameters.
-
subscriptions.get: Only return downloadable subscriptions.
- Remove unsupported "downloadable" parameter.
- Remove unsupported "special" parameter.
-
subscriptions.listen:
- Rename "disabled" event to "changed".
- Make further changes, according to https://gitlab.com/eyeo/webext/webext-sdk/-/issues/93 .
- Update test environment mocks accordingly.
- Update docs/messaging.md accordingly.
- Make the following adjustments to the Messaging API:
Hints for testers
The following parts of the extension should continue working:
- Initialization of filters, filter lists and Acceptable Ads in desktop settings page.
- En-/disabling filters.
incl. reflecting those changes accordingly in desktop and mobile settings pages - En-/disabling filter lists.
incl. reflecting those changes accordingly in desktop and mobile settings pages - Adding/removing the Acceptable Ads filter lists.
- Changes to a filter lists meta data (i.e. download status, homepage, last download, title)
incl. reflecting those changes accordingly in desktop and mobile settings pages - Removing a filter in the desktop settings page.
- Bulk adding/removing filters in the desktop settings page.
- Including downloadable filter lists in issue reports, while excluding special filter lists.
Additionally, the "OTHER" filter type should be shown among all other types in the dropdown element in the developer tools panel.
Hints for translators
N/A
Edited by Thomas Greiner