Use default DM Relays everywhere

This commit is contained in:
Kgothatso Ngako
2026-06-22 23:18:01 +02:00
parent e05a1250de
commit 964915214b
10 changed files with 11 additions and 11 deletions

View File

@@ -170,7 +170,7 @@ class DatabaseNostrRepository(
UnsignedNostrEvent(
pubKey = publicKey,
kind = SearchRelayListEvent.KIND,
tags = Relays.DefaultSearchRelayList.map {
tags = Relays.DefaultDMRelayList.map {
RelayTag.assemble(
it
)
@@ -190,7 +190,7 @@ class DatabaseNostrRepository(
tags = arrayOf(
AltTag.assemble(RelayFeedsListEvent.ALT)
),
privateTags = Relays.DefaultGlobalRelays.map {
privateTags = Relays.DefaultDMRelayList.map {
RelayTag.assemble(
it
)

View File

@@ -112,7 +112,7 @@ class ChatRoomDetailMessageListViewModel(
isReceiverChatMessageRelayListMissing.value = true
// TODO: compute the timestamp for when list we sent messages and use that as since...
Pair(
at.torch.compose.nostr.Relays.negentropicRelaySet,
at.torch.compose.nostr.Relays.DefaultDMRelayList,
_root_ide_package_.at.torch.compose.database.model.types.SynchronizationFilter(
kinds = arrayOf(
ChatMessageRelayListEvent.KIND,

View File

@@ -43,7 +43,7 @@ class FeedListViewModel(
val isSynchronizationPending: MutableState<Boolean> = mutableStateOf(false)
val negentropySynchronizeRequests = at.torch.compose.nostr.Relays.negentropicRelaySet.shuffled().map { normalizedRelayUrl ->
val negentropySynchronizeRequests = at.torch.compose.nostr.Relays.DefaultDMRelayList.shuffled().map { normalizedRelayUrl ->
_root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest(
id = at.torch.compose.database.model.NegentropySynchronizeRequest.computeId(
normalizedRelayUrl.url,

View File

@@ -67,7 +67,7 @@ class FollowersListViewModel(
viewModelScope.launch(Dispatchers.IO) {
// Sync Notifications... might want to also run this in the background
nostrRepository.queueNegentropySynchronizeRequest(
at.torch.compose.nostr.Relays.negentropicRelaySet.shuffled().map { normalizedRelayUrl ->
at.torch.compose.nostr.Relays.DefaultDMRelayList.shuffled().map { normalizedRelayUrl ->
_root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest(
id = at.torch.compose.database.model.NegentropySynchronizeRequest.computeId(
relayURL = normalizedRelayUrl.url,

View File

@@ -66,7 +66,7 @@ class FollowingListViewModel(
viewModelScope.launch(Dispatchers.IO) {
// Sync Notifications... might want to also run this in the background
nostrRepository.queueNegentropySynchronizeRequest(
at.torch.compose.nostr.Relays.negentropicRelaySet.shuffled().map { normalizedRelayUrl ->
at.torch.compose.nostr.Relays.DefaultDMRelayList.shuffled().map { normalizedRelayUrl ->
_root_ide_package_.at.torch.compose.database.model.NegentropySynchronizeRequest(
id = at.torch.compose.database.model.NegentropySynchronizeRequest.computeId(
relayURL = normalizedRelayUrl.url,

View File

@@ -74,7 +74,7 @@ class InReplyToViewModel(
// Sync Notifications... might want to also run this in the background
val publicRelays = profile?.profilePublicRelays(
nostrRepository
) ?: at.torch.compose.nostr.Relays.negentropicRelaySet
) ?: at.torch.compose.nostr.Relays.DefaultDMRelayList
nostrRepository.queueNegentropySynchronizeRequest(
publicRelays.take(3).map { normalizedRelayUrl ->

View File

@@ -36,7 +36,7 @@ class NostrEventDetailViewModel(
viewModelScope.launch(Dispatchers.IO) {
// Sync Notifications... might want to also run this in the background
nostrRepository.queueSynchronizeNostrEvent(
at.torch.compose.nostr.Relays.eventPublishRelaySet.take(1).map { normalizedRelay -> // TODO: Sync from all relays instead of 1
at.torch.compose.nostr.Relays.DefaultDMRelayList.take(1).map { normalizedRelay -> // TODO: Sync from all relays instead of 1
_root_ide_package_.at.torch.compose.database.model.SynchronizeNostrEventRequest(
purpose = "detail",
synchronizationFilters = arrayOf(

View File

@@ -103,7 +103,7 @@ class NotaryViewModel(
sig = event.sig,
unsignedNostrEventId = unsignedNostrEvent.id
),
relayURLs = at.torch.compose.nostr.Relays.eventPublishRelaySet.map { normalizedRelayUrl -> normalizedRelayUrl.url },
relayURLs = at.torch.compose.nostr.Relays.DefaultDMRelayList.map { normalizedRelayUrl -> normalizedRelayUrl.url },
activeKeyPair = keyPair
)
}

View File

@@ -78,7 +78,7 @@ class SearchResultViewModel(
viewModelScope.launch(Dispatchers.IO) {
// Sync Notifications... might want to also run this in the background
searchRepository.submitSearch(
at.torch.compose.nostr.Relays.eventFinderRelaySet.take(1).map { normalizedRelay -> // TODO: Search all relays instead of the first
at.torch.compose.nostr.Relays.eventFinderRelaySet.map { normalizedRelay -> // TODO: Search all relays instead of the first
_root_ide_package_.at.torch.compose.database.model.SynchronizeNostrEventRequest(
purpose = "search",
synchronizationFilters = arrayOf(

View File

@@ -55,7 +55,7 @@ class UnqueuedProfileSynchronizationViewModel(
delay(2_000)
nostrRepository.queueSynchronizeNostrEvent(
at.torch.compose.nostr.Relays.eventPublishRelaySet.map { normalizedRelayUrl ->
at.torch.compose.nostr.Relays.DefaultDMRelayList.map { normalizedRelayUrl ->
_root_ide_package_.at.torch.compose.database.model.SynchronizeNostrEventRequest(
purpose = "sign-in",
synchronizationFilters = arrayOf(