mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-05 18:13:21 +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:"
|
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(
|
suspend fun createFromScratch(
|
||||||
followUsers: List<ContactTag>,
|
followUsers: List<ContactTag>,
|
||||||
relayUse: Map<String, ReadWrite>?,
|
relayUse: Map<String, ReadWrite>?,
|
||||||
@@ -189,5 +174,20 @@ class ContactListEvent(
|
|||||||
|
|
||||||
return signer.sign(createdAt, KIND, newTags, content)
|
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