mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-25 16:01:09 +02:00
adds local relays to the connecting set
This commit is contained in:
parent
4a43b57f79
commit
ab037e61aa
@ -270,6 +270,21 @@ class Account(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mappedRelaySet =
|
||||||
|
mappedRelaySet.map {
|
||||||
|
if (localRelayServers.contains(it.url) == true) {
|
||||||
|
Relay(it.url, true, true, it.activeTypes + setOf(FeedType.FOLLOWS, FeedType.PUBLIC_CHATS, FeedType.GLOBAL, FeedType.PRIVATE_DMS))
|
||||||
|
} else {
|
||||||
|
it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
localRelayServers.forEach { newUrl ->
|
||||||
|
if (mappedRelaySet.filter { it.url == newUrl }.isEmpty()) {
|
||||||
|
mappedRelaySet = mappedRelaySet + Relay(newUrl, true, true, setOf(FeedType.FOLLOWS, FeedType.PUBLIC_CHATS, FeedType.GLOBAL, FeedType.PRIVATE_DMS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mappedRelaySet =
|
mappedRelaySet =
|
||||||
mappedRelaySet.map { relay ->
|
mappedRelaySet.map { relay ->
|
||||||
val nip65setup = nip65RelaySet?.firstOrNull { relay.url == it.relayUrl }
|
val nip65setup = nip65RelaySet?.firstOrNull { relay.url == it.relayUrl }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user