diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/NotificationChannels.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/NotificationChannels.kt index 9559161a61..7838e8e11d 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/NotificationChannels.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/NotificationChannels.kt @@ -28,6 +28,7 @@ import androidx.core.app.NotificationManagerCompat import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbol import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols +import com.vitorpamplona.amethyst.isDebug import com.vitorpamplona.amethyst.service.call.notification.CallNotifier import com.vitorpamplona.amethyst.service.scheduledposts.AndroidScheduledPostNotifier import com.vitorpamplona.amethyst.ui.stringRes @@ -66,14 +67,18 @@ object NotificationChannels { * sensible settings order, plus the two non-event channels (scheduled posts, * calls) that don't map to a Nostr event kind. */ val contentChannels: List = - NotificationCategory.entries.map { category -> - Entry( - nameRes = category.channelNameRes, - icon = category.settingsIcon, - channelId = { category.channelId(it) }, - ensure = { category.ensureChannel(it) }, - ) - } + + NotificationCategory.entries + // Chess (NIP-64) is a debug-only feature for now — don't surface (or + // create) its channel in release settings. + .filter { it != NotificationCategory.CHESS || isDebug } + .map { category -> + Entry( + nameRes = category.channelNameRes, + icon = category.settingsIcon, + channelId = { category.channelId(it) }, + ensure = { category.ensureChannel(it) }, + ) + } + listOf( Entry( nameRes = R.string.app_notification_scheduled_posts_channel_name, diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/renderers/ChessNotification.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/renderers/ChessNotification.kt index 71d3a74c0d..f3aa6bf7ab 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/renderers/ChessNotification.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/renderers/ChessNotification.kt @@ -23,6 +23,7 @@ package com.vitorpamplona.amethyst.service.notifications.renderers import android.content.Context import androidx.annotation.StringRes import com.vitorpamplona.amethyst.R +import com.vitorpamplona.amethyst.isDebug import com.vitorpamplona.amethyst.model.Account import com.vitorpamplona.amethyst.model.LocalCache import com.vitorpamplona.amethyst.service.notifications.NotificationCategory @@ -45,6 +46,9 @@ object ChessNotification { event: BaseChessEvent, @StringRes contentRes: Int, ) { + // NIP-64 chess is a debug-only feature for now; don't notify in release. + if (!isDebug) return + val author = LocalCache.getOrCreateUser(event.pubKey) val accountNpub = NotificationRoutes.accountNpub(account) val uri = NotificationRoutes.notificationsUri(accountNpub, event.id)