on master help sign in
Simplify server.knot: collapse GossipOnline literal, remove redundant pollResult destructure
commit52ab141b2e0e53561ce1fae0f4f1aacadcf449a7 authoriko <mail@iko.soy> dateSun 10 May 2026, 20:44 (5 months ago) parent010f8d1
1 file changed+2−4
server.knot+2−4
server.knot+2−4
@@ -662,11 +662,9 @@ handlePoll = \cursor authorization clientIp -> do
662662 case setup of
663663 Nothing {} -> yield (Err {error: {status: 401, message: "unauthorized"}})
664664 Just {value: s} -> do
665− when federationEnabled (fork (sendBatchedGossip s.refreshPeers [
666− GossipOnline {s.pubkey}
667− ]))
665+ when federationEnabled (fork (sendBatchedGossip s.refreshPeers [GossipOnline {s.pubkey}]))
668666 pollResult <- doPoll s t
669− yield (Ok {value: {pollResult.events, pollResult.cursor}})
667+ yield (Ok {value: pollResult})
670668
671669-- One pass: collect this pubkey's unexpired messages newer than the cursor,
672670-- sort by receivedAt, take up to `maxPollEvents`. The returned cursor is the