mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-19 08:21:05 +02:00
Makes sure the account is writeable before signing Auth for notifications
This commit is contained in:
@@ -23,7 +23,7 @@ class RegisterAccounts(
|
||||
): List<RelayAuthEvent> {
|
||||
return accounts.mapNotNull {
|
||||
val acc = LocalPreferences.loadFromEncryptedStorage(it.npub)
|
||||
if (acc != null) {
|
||||
if (acc != null && acc.isWriteable()) {
|
||||
val relayToUse = acc.activeRelays()?.firstOrNull { it.read }
|
||||
if (relayToUse != null) {
|
||||
acc.createAuthEvent(relayToUse, notificationToken)
|
||||
|
Reference in New Issue
Block a user