chat4app-client-angular 1.0.1 → 1.0.2

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,7 +1,6 @@
1
1
  import { Injectable, OnDestroy } from '@angular/core';
2
2
  import { HttpClient, HttpHeaders } from '@angular/common/http';
3
3
  import { Observable, BehaviorSubject } from 'rxjs';
4
- import { environment } from '../../environments/environment';
5
4
  import * as Stomp from 'stompjs';
6
5
  import * as SockJS from 'sockjs-client';
7
6
 
@@ -10,7 +9,8 @@ import * as SockJS from 'sockjs-client';
10
9
 
11
10
  @Injectable()
12
11
  export class Chat4AppService {
13
- public chatUrl = environment.serverChat4app + "/api/v1/";
12
+ public chatHost = "https://app.dev.chat4app.com" ;
13
+ public chatUrl = this.chatHost + "/api/v1/";
14
14
 
15
15
  sock: any;
16
16
  stompClient: any;
@@ -19,6 +19,9 @@ export class Chat4AppService {
19
19
  private http: HttpClient
20
20
  ) {
21
21
 
22
+ }
23
+ setApiKey(apiKey: string){
24
+
22
25
  }
23
26
 
24
27
  init(callback: any, chatCallback?: IChatCallback, token?: string) {
@@ -336,7 +339,7 @@ export class Chat4AppService {
336
339
 
337
340
  let securityToken = this.getBearerToken();
338
341
 
339
- this.sock = new SockJS( environment.serverChat4app + '/stomp/gkz-stomp-endpoint?token=' + securityToken);
342
+ this.sock = new SockJS( this.chatHost + '/stomp/gkz-stomp-endpoint?token=' + securityToken);
340
343
  this.stompClient = Stomp.over(this.sock);
341
344
  this.stompClient.debug = function (msg: any) {
342
345
  console.log(msg);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "chat4app-client-angular",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
- "main": "chat4app.service.ts",
5
+
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },