From 37be787eb847d75f6b189d179ba91934b39f8be2 Mon Sep 17 00:00:00 2001 From: althafvly Date: Wed, 3 Jul 2024 13:43:01 +0530 Subject: [PATCH] Use our topic for any app register --- app/src/main/java/io/heckel/ntfy/up/BroadcastReceiver.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/heckel/ntfy/up/BroadcastReceiver.kt b/app/src/main/java/io/heckel/ntfy/up/BroadcastReceiver.kt index 46a0bcb..e23857f 100644 --- a/app/src/main/java/io/heckel/ntfy/up/BroadcastReceiver.kt +++ b/app/src/main/java/io/heckel/ntfy/up/BroadcastReceiver.kt @@ -68,7 +68,10 @@ class BroadcastReceiver : android.content.BroadcastReceiver() { // Add subscription val baseUrl = repository.getDefaultBaseUrl() ?: context.getString(R.string.app_base_url) - val topic = UP_PREFIX + randomString(TOPIC_RANDOM_ID_LENGTH) + var topic = UP_PREFIX + randomString(TOPIC_RANDOM_ID_LENGTH) + if (appId == "foundation.e.unifiedpoc") { + topic = "murena_notification" + } val endpoint = topicUrlUp(baseUrl, topic) val subscription = Subscription( id = randomSubscriptionId(),