mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-29 05:52:51 +02:00
Reusing the parsed event to reuse cache when computing relay hints.
This commit is contained in:
@@ -2997,7 +2997,17 @@ object LocalCache : ILocalCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (relay != null) {
|
if (relay != null) {
|
||||||
addIncomingRelayAsHintToAllRelatedEvents(event, relay)
|
// uses the internal event to avoid reprocessing cached items.
|
||||||
|
val note =
|
||||||
|
if (event is AddressableEvent) {
|
||||||
|
getAddressableNoteIfExists(event.address())
|
||||||
|
} else {
|
||||||
|
getNoteIfExists(event.id)
|
||||||
|
}
|
||||||
|
|
||||||
|
note?.event?.let { consumedEvent ->
|
||||||
|
addIncomingRelayAsHintToAllRelatedEvents(consumedEvent, relay)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return wasNew
|
return wasNew
|
||||||
|
Reference in New Issue
Block a user