aotrautils-srv 0.0.150 → 0.0.153
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.0.0.000 (17/07/2022-03:
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1.0.0.000 (17/07/2022-03:50:48)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -4828,7 +4828,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
4828
4828
|
|
|
4829
4829
|
|
|
4830
4830
|
|
|
4831
|
-
/*utils SERVER library associated with aotra version : «1.0.0.000 (17/07/2022-03:
|
|
4831
|
+
/*utils SERVER library associated with aotra version : «1.0.0.000 (17/07/2022-03:50:48)»*/
|
|
4832
4832
|
/*-----------------------------------------------------------------------------*/
|
|
4833
4833
|
|
|
4834
4834
|
|
|
@@ -5177,23 +5177,35 @@ WebsocketImplementation={
|
|
|
5177
5177
|
|
|
5178
5178
|
// dataWrapped=JSON.parse(dataWrapped);
|
|
5179
5179
|
// dataWrapped=getAt(dataWrapped,0);// We get the root element
|
|
5180
|
-
|
|
5180
|
+
|
|
5181
|
+
let dataWrapped=message;
|
|
5182
|
+
try{
|
|
5183
|
+
dataWrapped=(WebsocketImplementation.useFlatStrings || isString(message)?JSON.parse(message):message);
|
|
5184
|
+
}catch(error1){
|
|
5185
|
+
// TRACE
|
|
5186
|
+
lognow(`ERROR : Failed to parse JSON for string «${dataWrapped}»`,error1);
|
|
5187
|
+
dataWrapped=(isString(message)?message:JSON.stringify(message));
|
|
5188
|
+
}
|
|
5181
5189
|
|
|
5182
5190
|
|
|
5183
5191
|
// DBG
|
|
5184
5192
|
lognow(" Channel information:dataWrapped",dataWrapped);
|
|
5185
|
-
lognow(" Channel information:dataWrapped
|
|
5193
|
+
lognow(" Channel information:dataWrapped",JSON.stringify(dataWrapped));
|
|
5194
|
+
lognow(" Channel information:dataWrapped.channelName«"+dataWrapped.channelName+"»");
|
|
5186
5195
|
lognow(" Channel information:receptionEntryPoint.channelName«"+receptionEntryPoint.channelName+"»");
|
|
5187
5196
|
lognow(" C1",(dataWrapped.channelName!=receptionEntryPoint.channelName));
|
|
5188
5197
|
lognow(" C2",(dataWrapped.channelName!==receptionEntryPoint.channelName));
|
|
5189
5198
|
lognow(" C11",(dataWrapped.channelName==receptionEntryPoint.channelName));
|
|
5190
5199
|
lognow(" C22",(dataWrapped.channelName===receptionEntryPoint.channelName));
|
|
5200
|
+
lognow(" C111",(dataWrapped.channelName.normalize()==receptionEntryPoint.channelName.normalize()));
|
|
5201
|
+
lognow(" C222",(dataWrapped.channelName.normalize()===receptionEntryPoint.channelName.normalize()));
|
|
5202
|
+
|
|
5191
5203
|
|
|
5192
5204
|
////
|
|
5193
5205
|
// CURRENT 5 : PROBLEM IS HERE :
|
|
5194
5206
|
|
|
5195
5207
|
// Channel information is stored in exchanged data :
|
|
5196
|
-
if(dataWrapped.channelName
|
|
5208
|
+
if(dataWrapped.channelName.normalize()!==receptionEntryPoint.channelName.normalize()) return;
|
|
5197
5209
|
|
|
5198
5210
|
|
|
5199
5211
|
const clientSocket=clientSocketParam;
|
aotrautils-srv/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils-srv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.153",
|
|
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)",
|