File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,15 @@ router.post(
5959 transformResult : ( result ) => {
6060 if ( result && result . successes && result . successes . length > 0 ) {
6161 console . log ( "[Server] Message successfully sent via v3 lightpush!" ) ;
62+
63+ const sentTime = Date . now ( ) ;
64+ const msgHash = '0x' + sentTime . toString ( 16 ) . substring ( - 8 ) . padStart ( 8 , '0' ) ;
65+
66+ const myPeerId = result . myPeerId || 'unknown' ;
67+ result . successes . forEach ( ( peerId : string ) => {
68+ console . log ( `publishWithConn my_peer_id=${ myPeerId } peer_id=${ peerId } msg_hash=${ msgHash } sentTime=${ sentTime } ` ) ;
69+ } ) ;
70+
6271 return {
6372 success : true ,
6473 result,
Original file line number Diff line number Diff line change @@ -244,6 +244,8 @@ export class WakuHeadless {
244244
245245 const serializableResult = makeSerializable ( result ) ;
246246
247+ serializableResult . myPeerId = this . waku . libp2p . peerId . toString ( ) ;
248+
247249 return serializableResult ;
248250 } catch ( error ) {
249251 console . error ( "Error sending message via v3 lightpush:" , error ) ;
You can’t perform that action at this time.
0 commit comments