@chat21/chat21-ionic 3.0.101 → 3.0.102
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 +2 -0
- package/package.json +1 -1
- package/src/app/app-routing.module.ts +10 -8
- package/src/app/chatlib/conversation-detail/message/return-receipt/return-receipt.component.scss +3 -3
- package/src/app/directives/marked.pipe.ts +1 -2
- package/src/app/modals/create-canned-response/create-canned-response.page.ts +1 -0
- package/src/assets/js/chat21client.js +9 -3
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -10,24 +10,26 @@ const routes: Routes = [
|
|
|
10
10
|
{ path: '', redirectTo: 'conversation-detail', pathMatch: 'full' },
|
|
11
11
|
{
|
|
12
12
|
path: 'conversations-list',
|
|
13
|
-
loadChildren: './pages/conversations-list/conversations-list.module#ConversationListPageModule'
|
|
14
|
-
|
|
13
|
+
// loadChildren: './pages/conversations-list/conversations-list.module#ConversationListPageModule'
|
|
14
|
+
loadChildren: () => import('./pages/conversations-list/conversations-list.module').then( m => m.ConversationListPageModule)
|
|
15
15
|
},
|
|
16
16
|
{ path: 'conversation-detail/:IDConv/:Convtype',
|
|
17
|
-
loadChildren: './pages/conversation-detail/conversation-detail.module#ConversationDetailPageModule'
|
|
17
|
+
// loadChildren: './pages/conversation-detail/conversation-detail.module#ConversationDetailPageModule'
|
|
18
|
+
loadChildren: () => import('./pages/conversation-detail/conversation-detail.module').then( m => m.ConversationDetailPageModule)
|
|
18
19
|
},
|
|
19
20
|
{ path: 'conversation-detail/:IDConv/:FullNameConv/:Convtype',
|
|
20
|
-
loadChildren: './pages/conversation-detail/conversation-detail.module#ConversationDetailPageModule'
|
|
21
|
+
// loadChildren: './pages/conversation-detail/conversation-detail.module#ConversationDetailPageModule'
|
|
22
|
+
loadChildren: () => import('./pages/conversation-detail/conversation-detail.module').then( m => m.ConversationDetailPageModule)
|
|
21
23
|
},
|
|
22
24
|
{
|
|
23
25
|
path: 'conversation-detail',
|
|
24
|
-
loadChildren: './pages/conversation-detail/conversation-detail.module#ConversationDetailPageModule'
|
|
25
|
-
|
|
26
|
+
// loadChildren: './pages/conversation-detail/conversation-detail.module#ConversationDetailPageModule'
|
|
27
|
+
loadChildren: () => import('./pages/conversation-detail/conversation-detail.module').then( m => m.ConversationDetailPageModule)
|
|
26
28
|
},
|
|
27
29
|
{
|
|
28
30
|
path: 'conversation-detail/:IDConv',
|
|
29
|
-
loadChildren: './pages/conversation-detail/conversation-detail.module#ConversationDetailPageModule'
|
|
30
|
-
|
|
31
|
+
// loadChildren: './pages/conversation-detail/conversation-detail.module#ConversationDetailPageModule'
|
|
32
|
+
loadChildren: () => import('./pages/conversation-detail/conversation-detail.module').then( m => m.ConversationDetailPageModule)
|
|
31
33
|
},
|
|
32
34
|
{
|
|
33
35
|
path: 'contacts-directory',
|
package/src/app/chatlib/conversation-detail/message/return-receipt/return-receipt.component.scss
CHANGED
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.c21-ico-schedule {
|
|
19
|
-
background-image: url("src/assets/images/f21ico-schedule.svg");
|
|
19
|
+
background-image: url("/src/assets/images/f21ico-schedule.svg");
|
|
20
20
|
}
|
|
21
21
|
.c21-ico-done {
|
|
22
|
-
background-image: url("src/assets/images/f21ico-done.svg");
|
|
22
|
+
background-image: url("/src/assets/images/f21ico-done.svg");
|
|
23
23
|
}
|
|
24
24
|
.c21-ico-done_all {
|
|
25
|
-
background-image: url("src/assets/images/f21ico-done_all.svg");
|
|
25
|
+
background-image: url("/src/assets/images/f21ico-done_all.svg");
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
Chat21Client
|
|
3
3
|
|
|
4
|
-
v0.1.12.
|
|
4
|
+
v0.1.12.6
|
|
5
5
|
|
|
6
6
|
@Author Andrea Sponziello
|
|
7
7
|
@Member Gabriele Panico
|
|
@@ -24,6 +24,7 @@ class Chat21Client {
|
|
|
24
24
|
this.reconnections = 0 // just to check how many reconnections
|
|
25
25
|
this.client_id = this.uuidv4();
|
|
26
26
|
this.log = options.log ? true : false;
|
|
27
|
+
|
|
27
28
|
if (options && options.MQTTendpoint) {
|
|
28
29
|
if (options.MQTTendpoint.startsWith('/')) {
|
|
29
30
|
if (this.log) {
|
|
@@ -99,7 +100,7 @@ class Chat21Client {
|
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
sendMessage(text, type, recipient_id, recipient_fullname, sender_fullname, attributes, metadata, channel_type, callback) {
|
|
102
|
-
// console.log("sendMessage:",
|
|
103
|
+
// console.log("sendMessage sattributes:", attributes);
|
|
103
104
|
let dest_topic = `apps/${this.appid}/outgoing/users/${this.user_id}/messages/${recipient_id}/outgoing`
|
|
104
105
|
// console.log("dest_topic:", dest_topic)
|
|
105
106
|
let outgoing_message = {
|
|
@@ -549,6 +550,7 @@ class Chat21Client {
|
|
|
549
550
|
}
|
|
550
551
|
this.subscribeToMyConversations(() => {
|
|
551
552
|
// no more than one "on_message" handler, thanks.
|
|
553
|
+
// console.log("Subscribed to MyConversations.");
|
|
552
554
|
this.on_message_handler = this.client.on('message', (topic, message) => {
|
|
553
555
|
if (this.log) {
|
|
554
556
|
console.log("topic:" + topic + "\nmessage payload:" + message)
|
|
@@ -628,6 +630,7 @@ class Chat21Client {
|
|
|
628
630
|
if (topic.includes("/messages/") && topic.endsWith(_CLIENTADDED)) {
|
|
629
631
|
if (this.onMessageAddedCallbacks) {
|
|
630
632
|
this.onMessageAddedCallbacks.forEach((callback, handler, map) => {
|
|
633
|
+
// console.log("DEBUG: MESSAGE:", message)
|
|
631
634
|
callback(JSON.parse(message.toString()), _topic)
|
|
632
635
|
});
|
|
633
636
|
}
|
|
@@ -922,6 +925,7 @@ class Chat21Client {
|
|
|
922
925
|
})
|
|
923
926
|
.then(function (response) {
|
|
924
927
|
if (log) {console.log("response.status:", response.status);}
|
|
928
|
+
// if (log) {console.log("response.data:", response.data);}
|
|
925
929
|
if (callback) {
|
|
926
930
|
callback(null, response.headers, response.data);
|
|
927
931
|
}
|
|
@@ -990,6 +994,7 @@ class Chat21Client {
|
|
|
990
994
|
}
|
|
991
995
|
if (this.log) {console.log("starting mqtt connection with LWT on:", this.presence_topic, this.endpoint)}
|
|
992
996
|
// client = mqtt.connect('mqtt://127.0.0.1:15675/ws',options)
|
|
997
|
+
//console.log("starting mqtt connection with LWT on:", this.presence_topic, this.endpoint)
|
|
993
998
|
this.client = mqtt.connect(this.endpoint,options)
|
|
994
999
|
|
|
995
1000
|
this.client.on('connect', // TODO if token is wrong it must reply with an error!
|
|
@@ -998,8 +1003,9 @@ class Chat21Client {
|
|
|
998
1003
|
if (!this.connected) {
|
|
999
1004
|
if (this.log) {console.log("Chat client first connection for:" + user_id)}
|
|
1000
1005
|
this.connected = true
|
|
1006
|
+
callback();
|
|
1001
1007
|
this.start( () => {
|
|
1002
|
-
callback();
|
|
1008
|
+
// callback();
|
|
1003
1009
|
});
|
|
1004
1010
|
}
|
|
1005
1011
|
this.client.publish(
|