From cbc5077b1f28f6c3a1c6f1e86caa9b70f0381c50 Mon Sep 17 00:00:00 2001 From: Karmanyaah Malhotra <32671690+karmanyaahm@users.noreply.github.com> Date: Thu, 9 Jun 2022 14:03:27 -0400 Subject: [PATCH] UnifiedPush: FEATURE_BYTES_MESSAGE distributors (#2581) Only use distributors which are compatible with FEATURE_BYTES_MESSAGE This is because Mastodon sends notifications that are arbritary bytes, not UTF-8. This causes issues in older versions of UnifiedPush distributors and providers that don't support FEATURE_BYTES_MESSAGE --- .../tusky/components/notifications/PushNotificationHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/components/notifications/PushNotificationHelper.kt b/app/src/main/java/com/keylesspalace/tusky/components/notifications/PushNotificationHelper.kt index a819b282..f1b71430 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/notifications/PushNotificationHelper.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/notifications/PushNotificationHelper.kt @@ -89,7 +89,7 @@ private suspend fun enableUnifiedPushNotificationsForAccount(context: Context, a // Already registered, update the subscription to match notification settings updateUnifiedPushSubscription(context, api, accountManager, account) } else { - UnifiedPush.registerAppWithDialog(context, account.id.toString()) + UnifiedPush.registerAppWithDialog(context, account.id.toString(), features = arrayListOf(UnifiedPush.FEATURE_BYTES_MESSAGE)) } }