aotrautils-srv 0.0.454 → 0.0.455

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- /*utils COMMONS library associated with aotra version : «1_29072022-2359 (26/01/2023-19:45:23)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (26/01/2023-23:29:45)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4864,7 +4864,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4864
4864
 
4865
4865
 
4866
4866
 
4867
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (26/01/2023-19:45:23)»*/
4867
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (26/01/2023-23:29:45)»*/
4868
4868
  /*-----------------------------------------------------------------------------*/
4869
4869
 
4870
4870
 
@@ -5825,9 +5825,13 @@ WebsocketImplementation={
5825
5825
 
5826
5826
  const resultPromise={
5827
5827
  clientsRoomsTag:clientsRoomsTag,
5828
- thenWhenReceiveMessageType:(channelNameForResponse, messageTypeForResponse, doOnIncomingMessageForResponse)=>{
5829
- const listenerId=messageTypeForResponse;
5830
- browserInstance.receive(channelNameForResponse, doOnIncomingMessageForResponse, this.clientsRoomsTag, listenerId);
5828
+ thenWhenReceiveMessageType:(channelNameForResponse, listenerConfig={messageType:"",condition:()=>true}, doOnIncomingMessageForResponse)=>{
5829
+ const listenerId=nonull(listenerConfig.messageType,"");
5830
+ browserInstance.receive(channelNameForResponse, (data, clientSocket)=>{
5831
+
5832
+ if(listenerConfig.condition && !listenerConfig.condition(data, clientSocket)) return ;
5833
+ doOnIncomingMessageForResponse(data, clientSocket);
5834
+ }, this.clientsRoomsTag, listenerId);
5831
5835
  return this;
5832
5836
  }
5833
5837
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.454",
3
+ "version": "0.0.455",
4
4
  "main": "aotrautils-srv.build.js",
5
5
  "description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",