mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-03 00:02:58 +02:00
Removes suspend of NostrSignerSync-based functions
This commit is contained in:
@@ -94,21 +94,6 @@ class ContactListEvent(
|
||||
|
||||
fun blockListFor(pubKeyHex: HexKey): String = "3:$pubKeyHex:"
|
||||
|
||||
suspend fun createFromScratch(
|
||||
followUsers: List<ContactTag> = emptyList(),
|
||||
relayUse: Map<String, ReadWrite>? = emptyMap(),
|
||||
signer: NostrSignerSync,
|
||||
createdAt: Long = TimeUtils.now(),
|
||||
): ContactListEvent {
|
||||
val content = relayUse?.let { RelaySet.assemble(it) } ?: ""
|
||||
|
||||
val tags =
|
||||
listOf(AltTag.assemble(ALT)) +
|
||||
followUsers.map { it.toTagArray() }
|
||||
|
||||
return signer.sign(createdAt, KIND, tags.toTypedArray(), content)
|
||||
}
|
||||
|
||||
suspend fun createFromScratch(
|
||||
followUsers: List<ContactTag>,
|
||||
relayUse: Map<String, ReadWrite>?,
|
||||
@@ -189,5 +174,20 @@ class ContactListEvent(
|
||||
|
||||
return signer.sign(createdAt, KIND, newTags, content)
|
||||
}
|
||||
|
||||
fun createFromScratch(
|
||||
followUsers: List<ContactTag> = emptyList(),
|
||||
relayUse: Map<String, ReadWrite>? = emptyMap(),
|
||||
signer: NostrSignerSync,
|
||||
createdAt: Long = TimeUtils.now(),
|
||||
): ContactListEvent {
|
||||
val content = relayUse?.let { RelaySet.assemble(it) } ?: ""
|
||||
|
||||
val tags =
|
||||
listOf(AltTag.assemble(ALT)) +
|
||||
followUsers.map { it.toTagArray() }
|
||||
|
||||
return signer.sign(createdAt, KIND, tags.toTypedArray(), content)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user