mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-15 20:33:10 +00:00
minor fix
This commit is contained in:
parent
34856918f4
commit
ec363fd458
@ -1161,12 +1161,12 @@ proc lightpushPublishHandler(
|
||||
message: WakuMessage,
|
||||
peer: RemotePeerInfo | PeerInfo,
|
||||
): Future[lightpush_protocol.WakuLightPushResult] {.async.} =
|
||||
# note: eligibilityProof is not used in this function, it has already been checked
|
||||
let msgHash = pubsubTopic.computeMessageHash(message).to0xHex()
|
||||
if not node.wakuLightpushClient.isNil():
|
||||
notice "publishing message with lightpush",
|
||||
pubsubTopic = pubsubTopic,
|
||||
contentTopic = message.contentTopic,
|
||||
eligibilityProof = eligibilityProof,
|
||||
target_peer_id = peer.peerId,
|
||||
msg_hash = msgHash
|
||||
return await node.wakuLightpushClient.publish(some(pubsubTopic), message, peer)
|
||||
@ -1175,7 +1175,6 @@ proc lightpushPublishHandler(
|
||||
notice "publishing message with self hosted lightpush",
|
||||
pubsubTopic = pubsubTopic,
|
||||
contentTopic = message.contentTopic,
|
||||
eligibilityProof = eligibilityProof,
|
||||
target_peer_id = peer.peerId,
|
||||
msg_hash = msgHash
|
||||
return
|
||||
|
||||
@ -17,7 +17,8 @@ import
|
||||
../serdes,
|
||||
../responses,
|
||||
../rest_serdes,
|
||||
./types
|
||||
./types,
|
||||
waku/incentivization/rpc
|
||||
|
||||
export types
|
||||
|
||||
@ -93,7 +94,7 @@ proc installLightPushRequestHandler*(
|
||||
makeRestResponse(lightpushResultServiceUnavailable(NoPeerNoneFoundError))
|
||||
toPeer = some(aPeer)
|
||||
|
||||
let subFut = node.lightpushPublish(req.pubsubTopic, msg, toPeer)
|
||||
let subFut = node.lightpushPublish(req.pubsubTopic, msg, none(EligibilityProof), toPeer)
|
||||
|
||||
if not await subFut.withTimeout(FutTimeoutForPushRequestProcessing):
|
||||
error "Failed to request a message push due to timeout!"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user