kopia lustrzana https://github.com/vitorpamplona/amethyst
Adds SeenOn relays when successfully broadcasting a note.
rodzic
1465ce112c
commit
3085353729
|
@ -69,6 +69,9 @@ abstract class NostrDataSource(val debugName: String) {
|
|||
}
|
||||
|
||||
override fun onSendResponse(eventId: String, success: Boolean, message: String, relay: Relay) {
|
||||
if (success) {
|
||||
markAsSeenOnRelay(eventId, relay)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAuth(relay: Relay, challenge: String) {
|
||||
|
@ -182,6 +185,10 @@ abstract class NostrDataSource(val debugName: String) {
|
|||
LocalCache.verifyAndConsume(event, relay)
|
||||
}
|
||||
|
||||
open fun markAsSeenOnRelay(eventId: String, relay: Relay) {
|
||||
LocalCache.getNoteIfExists(eventId)?.addRelay(relay)
|
||||
}
|
||||
|
||||
abstract fun updateChannelFilters()
|
||||
open fun auth(relay: Relay, challenge: String) = Unit
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue