@chat21/chat21-ionic 3.0.96-rc.1 → 3.0.96
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/.github/workflows/docker-community-push-latest.yml +1 -1
- package/.github/workflows/docker-image-tag-community-tag-push.yml +1 -1
- package/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +15 -0
- package/src/assets/js/chat21client.js +5 -1
|
@@ -13,7 +13,7 @@ jobs:
|
|
|
13
13
|
- name: Check out the repo
|
|
14
14
|
uses: actions/checkout@v2
|
|
15
15
|
- name: Push to Docker Hub
|
|
16
|
-
uses: docker/build-push-action@
|
|
16
|
+
uses: docker/build-push-action@v1
|
|
17
17
|
with:
|
|
18
18
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
19
19
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.96 in PROD
|
|
4
|
+
|
|
5
|
+
### 3.0.96-rc.2
|
|
6
|
+
- changed: chat21client.js to v0.1.12.5 (window scope fixed)
|
|
7
|
+
|
|
3
8
|
### 3.0.96-rc.1
|
|
4
9
|
- added: isFirstMessage, isSameSender, isLastMessage, isFirstMessage function to utils-message
|
|
5
10
|
- added: online/offline status check for offline automatic email -> presence service impl
|
package/package.json
CHANGED
|
@@ -940,6 +940,19 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
940
940
|
|
|
941
941
|
}
|
|
942
942
|
|
|
943
|
+
// createEmailText(lastMessageText: string): string{
|
|
944
|
+
// let text = ''
|
|
945
|
+
// this.messages.reverse().forEach((message, index) => {
|
|
946
|
+
// if(isInfo(message))
|
|
947
|
+
// return;
|
|
948
|
+
// if(index === 0)
|
|
949
|
+
// text += message.sender_fullname +'REPLIED TO YOU' + ': ' + message.text +' ('+ new Date(message.timestamp).toDateString() + ')' + '\n\n\n'
|
|
950
|
+
// if(index !== 0)
|
|
951
|
+
// text += message.sender_fullname + ': ' + message.text + '\n'
|
|
952
|
+
// })
|
|
953
|
+
// return text
|
|
954
|
+
// }
|
|
955
|
+
|
|
943
956
|
sendEmail(message: string): Observable<boolean>{
|
|
944
957
|
const tiledeskToken= this.tiledeskAuthService.getTiledeskToken();
|
|
945
958
|
const emailFormGroup = {
|
|
@@ -1038,6 +1051,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1038
1051
|
this.leadInfo && this.leadInfo.presence && this.leadInfo.presence['status']=== 'offline' &&
|
|
1039
1052
|
this.leadInfo.email && !emailSectionMsg){
|
|
1040
1053
|
this.logger.log('[CONVS-DETAIL] - SEND MESSAGE --> SENDING EMAIL', msg, this.leadInfo.email)
|
|
1054
|
+
// let msgText = this.createEmailText(msg)
|
|
1055
|
+
// console.log('messsss-->', msgText)
|
|
1041
1056
|
this.sendEmail(msg).subscribe(status => {
|
|
1042
1057
|
if(status){
|
|
1043
1058
|
//SEND MESSAGE ALSO AS EMAIL
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
2
|
Chat21Client
|
|
3
3
|
|
|
4
|
-
v0.1.12.
|
|
4
|
+
v0.1.12.5
|
|
5
5
|
|
|
6
6
|
@Author Andrea Sponziello
|
|
7
|
+
@Member Gabriele Panico
|
|
7
8
|
(c) Tiledesk 2020
|
|
8
9
|
*/
|
|
9
10
|
|
|
@@ -29,6 +30,9 @@ class Chat21Client {
|
|
|
29
30
|
console.log("MQTTendpoint relative url");
|
|
30
31
|
}
|
|
31
32
|
var loc = window.location, new_uri;
|
|
33
|
+
if(window.frameElement && window.frameElement.getAttribute('tiledesk_context') === 'parent'){
|
|
34
|
+
loc = window.parent.location
|
|
35
|
+
}
|
|
32
36
|
if (loc.protocol === "https:") {
|
|
33
37
|
// new_uri = "wss:";
|
|
34
38
|
new_uri = "mqtt:";
|