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

Consumer Api: Don't display push notifications for new datawallet modifications #1000

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
dc22b53
chore: Remove translations for the "datawallet modifications created"…
MH321Productions Dec 19, 2024
7c407e2
fix: Add empty title and body
MH321Productions Dec 19, 2024
3853c02
fix: Only throw if no entry was found at all
MH321Productions Dec 19, 2024
04c387a
fix: Exclude `DatawalletModificationsCreatedPushNotification` from tests
MH321Productions Dec 19, 2024
814f43d
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Dec 20, 2024
3623771
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Dec 20, 2024
5e3539b
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Dec 21, 2024
323a4be
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Dec 21, 2024
f104d50
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Dec 24, 2024
9717857
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Dec 27, 2024
dd5a329
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Dec 31, 2024
7c9d7c0
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Jan 7, 2025
3f480a9
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Jan 7, 2025
3ba414a
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Jan 7, 2025
16bb53e
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Jan 7, 2025
d081d40
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Jan 8, 2025
f3b2653
Merge branch 'main' into dont-display-push-notifications-for-new-data…
mergify[bot] Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ private NotificationText GetNotificationTextFromResourceManager(Type pushNotific
var title = _resourceManager.GetString(titleKey, culture);
var body = _resourceManager.GetString(bodyKey, culture);

if (title.IsNullOrEmpty())
if (title == null)
throw new MissingPushNotificationTextException($"Title for notification type '{pushNotificationTypeName}' not found.");

if (body.IsNullOrEmpty())
if (body == null)
throw new MissingPushNotificationTextException($"Body for notification type '{pushNotificationTypeName}' not found.");

return new NotificationText(title, body);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DatawalletModificationsCreatedPushNotification.Body" xml:space="preserve">
<value>Es sind Neuigkeiten in der App verfügbar.</value>
</data>
<data name="DatawalletModificationsCreatedPushNotification.Title" xml:space="preserve">
<value>Neuigkeiten verfügbar</value>
</data>
<data name="DeletionProcessApprovedPushNotification.Body" xml:space="preserve">
<value>Ein Löschvorgang einer Ihrer Identitäten wurde bestätigt und wird in Kürze prozessiert.</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DatawalletModificationsCreatedPushNotification.Body" xml:space="preserve">
<value>Nuovi aggiornamenti sono disponibili nell'app.</value>
</data>
<data name="DatawalletModificationsCreatedPushNotification.Title" xml:space="preserve">
<value>Aggiornamenti disponibili</value>
</data>
<data name="DeletionProcessApprovedPushNotification.Body" xml:space="preserve">
<value>Un processo di eliminazione di una delle Sue identità è stato approvato e verrà elaborato a breve.</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DatawalletModificationsCreatedPushNotification.Body" xml:space="preserve">
<value>Há atualizações disponíveis na aplicação.</value>
</data>
<data name="DatawalletModificationsCreatedPushNotification.Title" xml:space="preserve">
<value>Atualizações Disponíveis</value>
</data>
<data name="DeletionProcessApprovedPushNotification.Body" xml:space="preserve">
<value>Um dos processos de eliminação de uma das suas identidades foi aprovado e será processado brevemente.</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DatawalletModificationsCreatedPushNotification.Body" xml:space="preserve">
<value>New updates are available in the app.</value>
</data>
<data name="DatawalletModificationsCreatedPushNotification.Title" xml:space="preserve">
<value>Updates available</value>
</data>
<data name="DeletionProcessApprovedPushNotification.Body" xml:space="preserve">
<value>A deletion process of one of your identities has been was approved and will be processed shortly.</value>
</data>
Expand Down Expand Up @@ -183,4 +177,10 @@
<data name="BackupDeviceUsedPushNotification.Body" xml:space="preserve">
<value>Your backup device was used.</value>
</data>
<data name="DatawalletModificationsCreatedPushNotification.Body" xml:space="preserve">
<value />
</data>
<data name="DatawalletModificationsCreatedPushNotification.Title" xml:space="preserve">
<value />
</data>
</root>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Backbone.BuildingBlocks.Application.PushNotifications;
using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications;
using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Announcements;
using Backbone.Modules.Devices.Application.Infrastructure.PushNotifications.Datawallet;
using Backbone.Modules.Devices.Domain.Entities.Identities;
using Backbone.Modules.Devices.Infrastructure.PushNotifications.NotificationTexts;

Expand Down Expand Up @@ -62,7 +63,8 @@ private static IEnumerable<Type> GetNotificationTypes()
typeof(TestPushNotification)
.Assembly.GetTypes()
.Where(t => t.IsAssignableTo(typeof(IPushNotification)) && !t.IsInterface)
.Where(t => t != typeof(NewAnnouncementPushNotification)); // `NewAnnouncementPushNotification` does not have a translatable text and must therefore be excluded
.Where(t => t != typeof(NewAnnouncementPushNotification)) // `NewAnnouncementPushNotification` does not have a translatable text and must therefore be excluded
.Where(t => t != typeof(DatawalletModificationsCreatedPushNotification)); //`DatawalletModificationsCreatedPushNotification` is empty and must therefore be excluded
}

private class AllSupportedLanguagesExceptEnglishCrossJoinedWithNotificationTypes : TheoryData<CommunicationLanguage, Type>
Expand Down
Loading