Skip to content

Commit

Permalink
Register to distributor with VAPID
Browse files Browse the repository at this point in the history
  • Loading branch information
p1gp1g authored and valldrac committed Nov 19, 2024
1 parent 2d6d23a commit 29c4f21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ package im.molly.unifiedpush

import android.content.Context
import org.thoughtcrime.securesms.dependencies.AppDependencies
import org.thoughtcrime.securesms.keyvalue.SignalStore
import org.unifiedpush.android.connector.UnifiedPush
import org.unifiedpush.android.connector.ui.SelectDistributorDialogsBuilder
import org.unifiedpush.android.connector.ui.UnifiedPushFunctions

object UnifiedPushDistributor {


@JvmStatic
fun registerApp() {
UnifiedPush.registerApp(AppDependencies.application)
UnifiedPush.registerApp(AppDependencies.application, vapid = SignalStore.unifiedpush.mollySocketVapid)
}

@JvmStatic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,6 @@ class UnifiedPushSettingsViewModel(private val application: Application) : ViewM
refreshAndUpdateRegistration(pingOnRegister = true)
}

fun setMollySocketVapid(vapid: String) {
SignalStore.unifiedpush.mollySocketVapid = vapid
}

class Factory(private val application: Application) : ViewModelProvider.Factory {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
return requireNotNull(modelClass.cast(UnifiedPushSettingsViewModel(application)))
Expand Down

0 comments on commit 29c4f21

Please sign in to comment.