@chat21/chat21-web-widget 5.0.69 → 5.0.70-ionic
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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# chat21-web-widget ver 5.0
|
|
2
2
|
|
|
3
|
+
### 5.0.70-ionic in PROD
|
|
4
|
+
- bug-fixed: widget not showed when click on launch button if is in mobile ionic app
|
|
5
|
+
|
|
6
|
+
### 5.0.70 in PROD
|
|
7
|
+
|
|
8
|
+
### 5.0.70-rc.1
|
|
9
|
+
- changed: chat21client.js version to v0.1.12.5
|
|
10
|
+
- changed: set callback function on chat21client.connect without wait the subscription get back
|
|
11
|
+
|
|
3
12
|
### 5.0.69 in PROD
|
|
4
13
|
|
|
5
14
|
### 5.0.69-rc.2
|
package/package.json
CHANGED
|
@@ -66,7 +66,6 @@ export class LastMessageComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
66
66
|
this.messages.push(conversationToMessage(this.conversation, this.g.senderId))
|
|
67
67
|
this.manageIframeHeight();
|
|
68
68
|
}
|
|
69
|
-
console.log('messsageeeeeeeee', this.messages)
|
|
70
69
|
// if(isImage(this.conversation)){
|
|
71
70
|
// this.fileSelected = Object.assign({}, this.conversation.metadata)
|
|
72
71
|
// this.fileSelected = Object.assign(this.fileSelected, this.getMetadataSize(this.fileSelected))
|
package/src/app/utils/globals.ts
CHANGED
|
@@ -394,7 +394,7 @@ export class Globals {
|
|
|
394
394
|
/**enable user to set a telegram number to chat with */
|
|
395
395
|
this.fileUploadAccept = "image/*,.pdf,.txt"
|
|
396
396
|
/**enable auto disconnect from messaging after a defined amount of time (s)*/
|
|
397
|
-
this.disconnetTime =
|
|
397
|
+
this.disconnetTime = 0
|
|
398
398
|
|
|
399
399
|
this.showWaitTime = true;
|
|
400
400
|
|
|
@@ -568,7 +568,7 @@ export class Globals {
|
|
|
568
568
|
if(isOpen && isMobile){
|
|
569
569
|
//block body scroll
|
|
570
570
|
// window.parent.document.body.style.height = '100vh';
|
|
571
|
-
window.parent.document.body.style.height = '0';
|
|
571
|
+
// window.parent.document.body.style.height = '0';
|
|
572
572
|
window.parent.document.body.style.width = '100%';
|
|
573
573
|
window.parent.document.body.style.overflowY = 'hidden'
|
|
574
574
|
window.parent.document.body.style.position = 'fixed';
|
|
@@ -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
|
|
@@ -101,7 +101,7 @@ class Chat21Client {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
sendMessage(text, type, recipient_id, recipient_fullname, sender_fullname, attributes, metadata, channel_type, callback) {
|
|
104
|
-
// console.log("sendMessage:",
|
|
104
|
+
// console.log("sendMessage sattributes:", attributes);
|
|
105
105
|
let dest_topic = `apps/${this.appid}/outgoing/users/${this.user_id}/messages/${recipient_id}/outgoing`
|
|
106
106
|
// console.log("dest_topic:", dest_topic)
|
|
107
107
|
let outgoing_message = {
|
|
@@ -551,6 +551,7 @@ class Chat21Client {
|
|
|
551
551
|
}
|
|
552
552
|
this.subscribeToMyConversations(() => {
|
|
553
553
|
// no more than one "on_message" handler, thanks.
|
|
554
|
+
// console.log("Subscribed to MyConversations.");
|
|
554
555
|
this.on_message_handler = this.client.on('message', (topic, message) => {
|
|
555
556
|
if (this.log) {
|
|
556
557
|
console.log("topic:" + topic + "\nmessage payload:" + message)
|
|
@@ -630,6 +631,7 @@ class Chat21Client {
|
|
|
630
631
|
if (topic.includes("/messages/") && topic.endsWith(_CLIENTADDED)) {
|
|
631
632
|
if (this.onMessageAddedCallbacks) {
|
|
632
633
|
this.onMessageAddedCallbacks.forEach((callback, handler, map) => {
|
|
634
|
+
// console.log("DEBUG: MESSAGE:", message)
|
|
633
635
|
callback(JSON.parse(message.toString()), _topic)
|
|
634
636
|
});
|
|
635
637
|
}
|
|
@@ -924,6 +926,7 @@ class Chat21Client {
|
|
|
924
926
|
})
|
|
925
927
|
.then(function (response) {
|
|
926
928
|
if (log) {console.log("response.status:", response.status);}
|
|
929
|
+
// if (log) {console.log("response.data:", response.data);}
|
|
927
930
|
if (callback) {
|
|
928
931
|
callback(null, response.headers, response.data);
|
|
929
932
|
}
|
|
@@ -992,6 +995,7 @@ class Chat21Client {
|
|
|
992
995
|
}
|
|
993
996
|
if (this.log) {console.log("starting mqtt connection with LWT on:", this.presence_topic, this.endpoint)}
|
|
994
997
|
// client = mqtt.connect('mqtt://127.0.0.1:15675/ws',options)
|
|
998
|
+
//console.log("starting mqtt connection with LWT on:", this.presence_topic, this.endpoint)
|
|
995
999
|
this.client = mqtt.connect(this.endpoint,options)
|
|
996
1000
|
|
|
997
1001
|
this.client.on('connect', // TODO if token is wrong it must reply with an error!
|
|
@@ -1000,8 +1004,9 @@ class Chat21Client {
|
|
|
1000
1004
|
if (!this.connected) {
|
|
1001
1005
|
if (this.log) {console.log("Chat client first connection for:" + user_id)}
|
|
1002
1006
|
this.connected = true
|
|
1007
|
+
callback();
|
|
1003
1008
|
this.start( () => {
|
|
1004
|
-
callback();
|
|
1009
|
+
// callback();
|
|
1005
1010
|
});
|
|
1006
1011
|
}
|
|
1007
1012
|
this.client.publish(
|