@chat21/chat21-ionic 3.0.73-rc.1 → 3.0.74
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.
- package/CHANGELOG.md +9 -1
- package/package.json +2 -2
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +1 -1
- package/src/app/services/tiledesk/tiledesk.service.ts +14 -38
- package/src/chat-config-pre.json +1 -1
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -0
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.74 in PROD
|
|
4
|
+
|
|
5
|
+
### 3.0.74-rc.1
|
|
6
|
+
- changed: dashboardUrl in env from absolute to relative http url
|
|
7
|
+
- bug-fixed: not get projectId if is direct covnersation
|
|
8
|
+
|
|
9
|
+
### 3.0.73 in PROD
|
|
10
|
+
|
|
3
11
|
### 3.0.73-rc.1
|
|
4
|
-
- bug-fixed: topic.split is not a function while a
|
|
12
|
+
- bug-fixed: topic.split is not a function while a conversation is closed by an agent in MQTT-conversations-handler.service
|
|
5
13
|
- removed: user id from contact-directory component
|
|
6
14
|
|
|
7
15
|
### 3.0.72 in PROD
|
package/package.json
CHANGED
|
@@ -518,7 +518,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
518
518
|
// this.initConversationsHandler(); // nk
|
|
519
519
|
if (this.conversationWith) {
|
|
520
520
|
this.disableTextarea = false
|
|
521
|
-
this._getProjectIdByConversationWith(this.conversationWith)
|
|
521
|
+
// this._getProjectIdByConversationWith(this.conversationWith)
|
|
522
522
|
this.initConversationHandler()
|
|
523
523
|
this.initGroupsHandler()
|
|
524
524
|
this.initSubscriptions()
|
|
@@ -43,12 +43,10 @@ export class TiledeskService {
|
|
|
43
43
|
const url = this.apiUrl + projectid + '/requests/' + supportgroupid + '/close';
|
|
44
44
|
|
|
45
45
|
this.logger.log('[TILEDESK-SERVICE] - closeSupportGroup URL ', url);
|
|
46
|
-
return this.http
|
|
47
|
-
.put(url, body, httpOptions)
|
|
48
|
-
.pipe(map((res: any) => {
|
|
46
|
+
return this.http.put(url, body, httpOptions).pipe(map((res: any) => {
|
|
49
47
|
this.logger.log('[TILEDESK-SERVICE] - closeSupportGroup - RES ', res);
|
|
50
48
|
return res
|
|
51
|
-
|
|
49
|
+
}))
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
// http://tiledesk-server-pre.herokuapp.com/requests_util/lookup/id_project/support-group-60ffe291f725db00347661ef-b4cb6875785c4a23b27244fe498eecf44
|
|
@@ -64,12 +62,10 @@ export class TiledeskService {
|
|
|
64
62
|
})
|
|
65
63
|
};
|
|
66
64
|
|
|
67
|
-
return this.http
|
|
68
|
-
.get(lookupUrl, httpOptions)
|
|
69
|
-
.pipe(map((res: any) => {
|
|
65
|
+
return this.http.get(lookupUrl, httpOptions).pipe(map((res: any) => {
|
|
70
66
|
this.logger.log('[TILEDESK-SERVICE] GET PROJECTID BY CONV RECIPIENT - RES ', res);
|
|
71
67
|
return res
|
|
72
|
-
|
|
68
|
+
}))
|
|
73
69
|
}
|
|
74
70
|
|
|
75
71
|
public getProjects(token: string) {
|
|
@@ -83,9 +79,7 @@ export class TiledeskService {
|
|
|
83
79
|
})
|
|
84
80
|
};
|
|
85
81
|
|
|
86
|
-
return this.http
|
|
87
|
-
.get(url, httpOptions)
|
|
88
|
-
.pipe(map((res: any) => {
|
|
82
|
+
return this.http.get(url, httpOptions).pipe(map((res: any) => {
|
|
89
83
|
this.logger.log('[TILEDESK-SERVICE] GET PROJECTS - RES ', res);
|
|
90
84
|
return res
|
|
91
85
|
}))
|
|
@@ -102,9 +96,7 @@ export class TiledeskService {
|
|
|
102
96
|
Authorization: token
|
|
103
97
|
})
|
|
104
98
|
};
|
|
105
|
-
return this.http
|
|
106
|
-
.get(url, httpOptions)
|
|
107
|
-
.pipe(map((res: any) => {
|
|
99
|
+
return this.http.get(url, httpOptions).pipe(map((res: any) => {
|
|
108
100
|
this.logger.log('[TILEDESK-SERVICE] GET PROJECT BY ID URL - RES ', res);
|
|
109
101
|
return res
|
|
110
102
|
}))
|
|
@@ -121,9 +113,7 @@ export class TiledeskService {
|
|
|
121
113
|
Authorization: token
|
|
122
114
|
})
|
|
123
115
|
};
|
|
124
|
-
return this.http
|
|
125
|
-
.get(url, httpOptions)
|
|
126
|
-
.pipe(map((res: any) => {
|
|
116
|
+
return this.http.get(url, httpOptions).pipe(map((res: any) => {
|
|
127
117
|
this.logger.log('[TILEDESK-SERVICE] - GET PROJECT-USER RES ', res);
|
|
128
118
|
return res
|
|
129
119
|
}))
|
|
@@ -139,9 +129,7 @@ export class TiledeskService {
|
|
|
139
129
|
Authorization: token
|
|
140
130
|
})
|
|
141
131
|
};
|
|
142
|
-
return this.http
|
|
143
|
-
.get(url, httpOptions)
|
|
144
|
-
.pipe(map((res: any) => {
|
|
132
|
+
return this.http.get(url, httpOptions).pipe(map((res: any) => {
|
|
145
133
|
this.logger.log('[TILEDESK-SERVICE] - GET ALL ACTIVE LEADS (LIMIT 10000) ', res);
|
|
146
134
|
return res
|
|
147
135
|
}))
|
|
@@ -161,9 +149,7 @@ export class TiledeskService {
|
|
|
161
149
|
})
|
|
162
150
|
};
|
|
163
151
|
const body = {};
|
|
164
|
-
return this.http
|
|
165
|
-
.post(url, body, httpOptions)
|
|
166
|
-
.pipe(map((res: any) => {
|
|
152
|
+
return this.http.post(url, body, httpOptions).pipe(map((res: any) => {
|
|
167
153
|
this.logger.log('[TILEDESK-SERVICE] - CREATE NEW PROJECT USER TO GET NEW LEAD ID url ', res);
|
|
168
154
|
return res
|
|
169
155
|
}))
|
|
@@ -186,9 +172,7 @@ export class TiledeskService {
|
|
|
186
172
|
const body = { 'lead_id': leadid, 'fullname': fullname, 'email': leademail };
|
|
187
173
|
this.logger.log('[TILEDESK-SERVICE] - CREATE NEW LEAD ', body);
|
|
188
174
|
|
|
189
|
-
return this.http
|
|
190
|
-
.post(url, body, httpOptions)
|
|
191
|
-
.pipe(map((res: any) => {
|
|
175
|
+
return this.http.post(url, body, httpOptions).pipe(map((res: any) => {
|
|
192
176
|
this.logger.log('[TILEDESK-SERVICE] - CREATE NEW LEAD RES ', res);
|
|
193
177
|
return res
|
|
194
178
|
}))
|
|
@@ -209,9 +193,7 @@ export class TiledeskService {
|
|
|
209
193
|
})
|
|
210
194
|
};
|
|
211
195
|
|
|
212
|
-
return this.http
|
|
213
|
-
.get(url, httpOptions)
|
|
214
|
-
.pipe(map((res: any) => {
|
|
196
|
+
return this.http.get(url, httpOptions).pipe(map((res: any) => {
|
|
215
197
|
this.logger.log('[TILEDESK-SERVICE] - GET ALL BOTS BY PROJECT ID - RES ', res);
|
|
216
198
|
return res
|
|
217
199
|
}))
|
|
@@ -232,9 +214,7 @@ export class TiledeskService {
|
|
|
232
214
|
})
|
|
233
215
|
};
|
|
234
216
|
|
|
235
|
-
return this.http
|
|
236
|
-
.get(url, httpOptions)
|
|
237
|
-
.pipe(map((res: any) => {
|
|
217
|
+
return this.http.get(url, httpOptions).pipe(map((res: any) => {
|
|
238
218
|
this.logger.log('[TILEDESK-SERVICE] - GET DEPTS (ALL STATUS) - RES ', res);
|
|
239
219
|
return res
|
|
240
220
|
}))
|
|
@@ -265,9 +245,7 @@ export class TiledeskService {
|
|
|
265
245
|
// , 'participants': [participantid]
|
|
266
246
|
|
|
267
247
|
this.logger.log('[WS-REQUESTS-SERV] - CREATE INTERNAL REQUEST body ', body);
|
|
268
|
-
return this.http
|
|
269
|
-
.post(url, body, httpOptions)
|
|
270
|
-
.pipe(map((res: any) => {
|
|
248
|
+
return this.http.post(url, body, httpOptions).pipe(map((res: any) => {
|
|
271
249
|
this.logger.log('[TILEDESK-SERVICE] - CREATE NEW LEAD RES ', res);
|
|
272
250
|
return res
|
|
273
251
|
}))
|
|
@@ -293,9 +271,7 @@ export class TiledeskService {
|
|
|
293
271
|
|
|
294
272
|
this.logger.log('[TILEDESK-SERVICE] CREATE CANNED-RES - BODY ', body);
|
|
295
273
|
|
|
296
|
-
return this.http
|
|
297
|
-
.post(url, JSON.stringify(body), httpOptions)
|
|
298
|
-
.pipe(map((res: any) => {
|
|
274
|
+
return this.http.post(url, JSON.stringify(body), httpOptions).pipe(map((res: any) => {
|
|
299
275
|
this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - RES ', res);
|
|
300
276
|
return res
|
|
301
277
|
}))
|
package/src/chat-config-pre.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"apiUrl": "https://tiledesk-server-pre.herokuapp.com/",
|
|
25
25
|
"baseImageUrl": "https://firebasestorage.googleapis.com/v0/b/",
|
|
26
|
-
"dashboardUrl": "
|
|
26
|
+
"dashboardUrl": "/dashboard/",
|
|
27
27
|
"logLevel": "DEBUG",
|
|
28
28
|
"authPersistence": "LOCAL",
|
|
29
29
|
"supportMode": true,
|
|
@@ -280,6 +280,7 @@ export class FirebaseConversationHandler extends ConversationHandlerService {
|
|
|
280
280
|
private messageGenerate(childSnapshot: any) {
|
|
281
281
|
const msg: MessageModel = childSnapshot.val();
|
|
282
282
|
msg.uid = childSnapshot.key;
|
|
283
|
+
msg.text = msg.text.trim() //remove black msg with only spaces
|
|
283
284
|
// controllo fatto per i gruppi da rifattorizzare
|
|
284
285
|
if (!msg.sender_fullname || msg.sender_fullname === 'undefined') {
|
|
285
286
|
msg.sender_fullname = msg.sender;
|
|
@@ -287,6 +287,7 @@ export class MQTTConversationHandler extends ConversationHandlerService {
|
|
|
287
287
|
this.logger.log("[MQTTConversationHandler] childSnapshot >" + JSON.stringify(childSnapshot));
|
|
288
288
|
const msg = childSnapshot;
|
|
289
289
|
msg.uid = childSnapshot.key;
|
|
290
|
+
msg.text = msg.text.trim() //remove black msg with only spaces
|
|
290
291
|
// controllo fatto per i gruppi da rifattorizzare
|
|
291
292
|
if (!msg.sender_fullname || msg.sender_fullname === 'undefined') {
|
|
292
293
|
msg.sender_fullname = msg.sender;
|