mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-04 06:53:12 +00:00
fix: subscribing to RelaydefaultHandler in libwaku (#3308)
This commit is contained in:
parent
a1901a044e
commit
798b4bb57b
@ -3,6 +3,7 @@ import chronicles, chronos, stew/byteutils, results
|
|||||||
import
|
import
|
||||||
../../../../../waku/waku_core/message/message,
|
../../../../../waku/waku_core/message/message,
|
||||||
../../../../../waku/factory/[external_config, validator_signed, waku],
|
../../../../../waku/factory/[external_config, validator_signed, waku],
|
||||||
|
../../../../../waku/waku_node,
|
||||||
../../../../../waku/waku_core/message,
|
../../../../../waku/waku_core/message,
|
||||||
../../../../../waku/waku_core/time, # Timestamp
|
../../../../../waku/waku_core/time, # Timestamp
|
||||||
../../../../../waku/waku_core/topics/pubsub_topic,
|
../../../../../waku/waku_core/topics/pubsub_topic,
|
||||||
@ -105,6 +106,7 @@ proc process*(
|
|||||||
case self.operation
|
case self.operation
|
||||||
of SUBSCRIBE:
|
of SUBSCRIBE:
|
||||||
# TO DO: properly perform 'subscribe'
|
# TO DO: properly perform 'subscribe'
|
||||||
|
waku.node.registerRelayDefaultHandler($self.pubsubTopic)
|
||||||
discard waku.node.wakuRelay.subscribe($self.pubsubTopic, self.relayEventCallback)
|
discard waku.node.wakuRelay.subscribe($self.pubsubTopic, self.relayEventCallback)
|
||||||
of UNSUBSCRIBE:
|
of UNSUBSCRIBE:
|
||||||
# TODO: properly perform 'unsubscribe'
|
# TODO: properly perform 'unsubscribe'
|
||||||
|
|||||||
@ -245,7 +245,7 @@ proc mountStoreSync*(
|
|||||||
|
|
||||||
## Waku relay
|
## Waku relay
|
||||||
|
|
||||||
proc registerRelayDefaultHandler(node: WakuNode, topic: PubsubTopic) =
|
proc registerRelayDefaultHandler*(node: WakuNode, topic: PubsubTopic) =
|
||||||
if node.wakuRelay.isSubscribed(topic):
|
if node.wakuRelay.isSubscribed(topic):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user