mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 19:16:40 +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) {
|
override fun consume(event: Event, relay: Relay) {
|
||||||
if (LocalCache.justVerify(event)) {
|
if (LocalCache.justVerify(event)) {
|
||||||
if (event is GiftWrapEvent) {
|
if (event is GiftWrapEvent) {
|
||||||
val privateKey = NostrChatroomListDataSource.account.keyPair.privKey
|
val privateKey = account.keyPair.privKey
|
||||||
if (privateKey != null) {
|
if (privateKey != null) {
|
||||||
event.cachedGift(privateKey)?.let {
|
event.cachedGift(privateKey)?.let {
|
||||||
this.consume(it, relay)
|
this.consume(it, relay)
|
||||||
@@ -136,7 +136,7 @@ object NostrAccountDataSource : NostrDataSource("AccountData") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (event is SealedGossipEvent) {
|
if (event is SealedGossipEvent) {
|
||||||
val privateKey = NostrChatroomListDataSource.account.keyPair.privKey
|
val privateKey = account.keyPair.privKey
|
||||||
if (privateKey != null) {
|
if (privateKey != null) {
|
||||||
event.cachedGossip(privateKey)?.let {
|
event.cachedGossip(privateKey)?.let {
|
||||||
LocalCache.justConsume(it, relay)
|
LocalCache.justConsume(it, relay)
|
||||||
|
Reference in New Issue
Block a user