mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-21 17:10:48 +02:00
Uses the right account to decrypt GiftWraps
This commit is contained in:
@@ -127,7 +127,7 @@ object NostrAccountDataSource : NostrDataSource("AccountData") {
|
||||
override fun consume(event: Event, relay: Relay) {
|
||||
if (LocalCache.justVerify(event)) {
|
||||
if (event is GiftWrapEvent) {
|
||||
val privateKey = NostrChatroomListDataSource.account.keyPair.privKey
|
||||
val privateKey = account.keyPair.privKey
|
||||
if (privateKey != null) {
|
||||
event.cachedGift(privateKey)?.let {
|
||||
this.consume(it, relay)
|
||||
@@ -136,7 +136,7 @@ object NostrAccountDataSource : NostrDataSource("AccountData") {
|
||||
}
|
||||
|
||||
if (event is SealedGossipEvent) {
|
||||
val privateKey = NostrChatroomListDataSource.account.keyPair.privKey
|
||||
val privateKey = account.keyPair.privKey
|
||||
if (privateKey != null) {
|
||||
event.cachedGossip(privateKey)?.let {
|
||||
LocalCache.justConsume(it, relay)
|
||||
|
Reference in New Issue
Block a user