mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-16 04:43:12 +00:00
minor refactor
This commit is contained in:
parent
236abfa83f
commit
0b1f189e10
@ -140,14 +140,4 @@ proc publishToAny*(
|
||||
# TODO: check if it is matches the situation - shall we distinguish client side missing peers from server side?
|
||||
return lighpushErrorResult(NO_PEERS_TO_RELAY, "no suitable remote peers")
|
||||
|
||||
let pushRequest = LightpushRequest(
|
||||
requestId: generateRequestId(wl.rng),
|
||||
pubSubTopic: some(pubSubTopic),
|
||||
message: message,
|
||||
)
|
||||
let publishedCount = ?await wl.sendPushRequest(pushRequest, peer)
|
||||
|
||||
for obs in wl.publishObservers:
|
||||
obs.onMessagePublished(pubSubTopic, message)
|
||||
|
||||
return lightpushSuccessResult(publishedCount)
|
||||
return await wl.publish(some(pubSubTopic), message, peer)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user