@maxzima/wa-communicator 1.0.29 → 1.0.31

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.
@@ -29,7 +29,7 @@ export class Communicator {
29
29
  if (index > 0) {
30
30
  separator = '&';
31
31
  }
32
- queryParamsString = `${queryParamsString}${separator}${queryParam[0]}=${queryParam[1]}`;
32
+ queryParamsString = `${queryParamsString}${separator}${queryParam[0]}=${encodeURIComponent(queryParam[1])}`;
33
33
  });
34
34
  return queryParamsString;
35
35
  };
@@ -114,9 +114,7 @@ export class Communicator {
114
114
  mobile: data.phoneNumber,
115
115
  };
116
116
  const url = `${this.props.clientAuthSSEBaseUrl}${"sse/app-auth"}`;
117
- this.sseAuth = new EventSource(`${url}?${this.processingQueryParams(params)}`, {
118
- withCredentials: true,
119
- });
117
+ this.sseAuth = new EventSource(new URL(`${url}?${this.processingQueryParams(params)}`));
120
118
  if (this.sseAuth) {
121
119
  this.sseAuth.addEventListener('open', (event) => {
122
120
  if (this.props.env !== 'prod') {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.29",
2
+ "version": "1.0.31",
3
3
  "name": "@maxzima/wa-communicator",
4
4
  "description": "",
5
5
  "author": "Noname",
@@ -117,10 +117,7 @@ export class Communicator {
117
117
  mobile: data.phoneNumber,
118
118
  }
119
119
  const url = `${this.props.clientAuthSSEBaseUrl}${CommunicatorAuthAPIEndpointEnum.SSE_AUTH}`;
120
- this.sseAuth = new EventSource(`${url}?${this.processingQueryParams(params)}`, {
121
- withCredentials: true,
122
- });
123
-
120
+ this.sseAuth = new EventSource(new URL(`${url}?${this.processingQueryParams(params)}`));
124
121
  if (this.sseAuth) {
125
122
  this.sseAuth.addEventListener('open', (event: MessageEvent) => {
126
123
  if (this.props.env !== 'prod') {
@@ -325,7 +322,7 @@ export class Communicator {
325
322
  separator = '&';
326
323
  }
327
324
 
328
- queryParamsString = `${queryParamsString}${separator}${queryParam[0]}=${queryParam[1]}`;
325
+ queryParamsString = `${queryParamsString}${separator}${queryParam[0]}=${encodeURIComponent(queryParam[1])}`;
329
326
  });
330
327
 
331
328
  return queryParamsString;