fix profile not loading
This commit is contained in:
-10
@@ -104,18 +104,8 @@ open class RelayConnectionManager(
|
||||
* Events will be sent to relays as they become connected.
|
||||
*/
|
||||
fun broadcastToAll(event: Event) {
|
||||
// Use all configured relays, not just currently connected ones
|
||||
// The NostrClient will queue/send events as relays connect
|
||||
val configuredRelays = relayStatuses.value.keys
|
||||
val connectedCount = connectedRelays.value.size
|
||||
println("[RelayManager] broadcastToAll: event kind=${event.kind}, ID=${event.id.take(8)}...")
|
||||
println("[RelayManager] Configured relays: ${configuredRelays.size}, Connected: $connectedCount")
|
||||
configuredRelays.forEach { relay ->
|
||||
val isConnected = connectedRelays.value.contains(relay)
|
||||
println("[RelayManager] - $relay: ${if (isConnected) "CONNECTED" else "pending"}")
|
||||
}
|
||||
send(event, configuredRelays)
|
||||
println("[RelayManager] broadcastToAll complete")
|
||||
}
|
||||
|
||||
private fun updateRelayStatus(
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ fun createContactListSubscription(
|
||||
onEose: (NormalizedRelayUrl, List<Filter>?) -> Unit = { _, _ -> },
|
||||
): SubscriptionConfig =
|
||||
SubscriptionConfig(
|
||||
subId = generateSubId("contact-list-$pubKeyHex"),
|
||||
subId = generateSubId("contacts-${pubKeyHex.take(8)}"),
|
||||
filters = listOf(FilterBuilders.contactList(pubKeyHex)),
|
||||
relays = relays,
|
||||
onEvent = onEvent,
|
||||
|
||||
+3
-3
@@ -35,7 +35,7 @@ fun createMetadataSubscription(
|
||||
onEose: (NormalizedRelayUrl, List<Filter>?) -> Unit = { _, _ -> },
|
||||
): SubscriptionConfig =
|
||||
SubscriptionConfig(
|
||||
subId = generateSubId("profile-metadata-$pubKeyHex"),
|
||||
subId = generateSubId("meta-${pubKeyHex.take(8)}"),
|
||||
filters = listOf(FilterBuilders.userMetadata(pubKeyHex)),
|
||||
relays = relays,
|
||||
onEvent = onEvent,
|
||||
@@ -53,7 +53,7 @@ fun createUserPostsSubscription(
|
||||
onEose: (NormalizedRelayUrl, List<Filter>?) -> Unit = { _, _ -> },
|
||||
): SubscriptionConfig =
|
||||
SubscriptionConfig(
|
||||
subId = generateSubId("profile-posts-$pubKeyHex"),
|
||||
subId = generateSubId("posts-${pubKeyHex.take(8)}"),
|
||||
filters = listOf(FilterBuilders.textNotesFromAuthors(listOf(pubKeyHex), limit = limit)),
|
||||
relays = relays,
|
||||
onEvent = onEvent,
|
||||
@@ -71,7 +71,7 @@ fun createNotificationsSubscription(
|
||||
onEose: (NormalizedRelayUrl, List<Filter>?) -> Unit = { _, _ -> },
|
||||
): SubscriptionConfig =
|
||||
SubscriptionConfig(
|
||||
subId = generateSubId("notifications-$pubKeyHex"),
|
||||
subId = generateSubId("notif-${pubKeyHex.take(8)}"),
|
||||
filters = listOf(FilterBuilders.notificationsForUser(pubKeyHex, limit = limit)),
|
||||
relays = relays,
|
||||
onEvent = onEvent,
|
||||
|
||||
Reference in New Issue
Block a user