mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-26 22:46:29 +02:00
Adds SeenOn relays when successfully broadcasting a note.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user