@chat21/chat21-web-widget 5.0.94-rc2 → 5.0.94-rc4
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
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
### **Copyrigth**:
|
|
7
7
|
*Tiledesk SRL*
|
|
8
8
|
|
|
9
|
+
# 5.0.94-rc4
|
|
10
|
+
- **added**: publish onMessageCreated only if status is >= 100
|
|
11
|
+
|
|
12
|
+
# 5.0.94-rc3
|
|
13
|
+
- **bug-fixed**: if hiddenMessage exist, onNewConversation event is not fired
|
|
14
|
+
|
|
9
15
|
# 5.0.94-rc2
|
|
10
16
|
- **added**: onNewConversation event in chatbot-panel.html page for logs
|
|
11
17
|
|
package/deploy_beta.sh
CHANGED
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -729,7 +729,6 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
729
729
|
this.logger.debug('[APP-COMP] AppComponent::startNewConversation hiddenMessage',this.g.hiddenMessage );
|
|
730
730
|
if(this.g.hiddenMessage){
|
|
731
731
|
this.onNewConversationWithMessage(this.g.hiddenMessage)
|
|
732
|
-
return;
|
|
733
732
|
}
|
|
734
733
|
|
|
735
734
|
this.triggerNewConversationEvent(newConvId);
|
|
@@ -15,7 +15,7 @@ import { ConversationModel } from 'src/chat21-core/models/conversation';
|
|
|
15
15
|
// utils
|
|
16
16
|
import { v4 as uuidv4 } from 'uuid';
|
|
17
17
|
import { HEADER_MENU_OPTION, UID_SUPPORT_GROUP_MESSAGES } from 'src/app/utils/constants';
|
|
18
|
-
import { CHANNEL_TYPE, INFO_MESSAGE_TYPE, TYPE_MSG_TEXT } from 'src/chat21-core/utils/constants';
|
|
18
|
+
import { CHANNEL_TYPE, INFO_MESSAGE_TYPE, MSG_STATUS_SENT, TYPE_MSG_TEXT } from 'src/chat21-core/utils/constants';
|
|
19
19
|
import { getDateDifference } from 'src/chat21-core/utils/utils';
|
|
20
20
|
import { isJustRecived, isUserBanned } from 'src/chat21-core/utils/utils-message';
|
|
21
21
|
|
|
@@ -743,9 +743,13 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
743
743
|
this.logger.debug('[CONV-COMP] ***** DETAIL messageAdded *****', msg);
|
|
744
744
|
if (msg) {
|
|
745
745
|
that.newMessageAdded(msg);
|
|
746
|
-
this.onNewMessageCreated.emit(msg)
|
|
747
746
|
this.checkMessagesLegntForTranscriptDownloadMenuOption();
|
|
748
747
|
this.resetTimeout();
|
|
748
|
+
|
|
749
|
+
/** publish onMessageCreated only if status is >= 100 */
|
|
750
|
+
if(msg.status >= MSG_STATUS_SENT){
|
|
751
|
+
this.onNewMessageCreated.emit(msg)
|
|
752
|
+
}
|
|
749
753
|
// this.updateLeadInfo(msg);
|
|
750
754
|
}
|
|
751
755
|
});
|
|
@@ -556,8 +556,8 @@
|
|
|
556
556
|
});
|
|
557
557
|
|
|
558
558
|
window.Tiledesk('onNewConversation', function(event_data) {
|
|
559
|
-
// console.log("
|
|
560
|
-
window.parent.postMessage({ source: 'widget', event: 'onNewConversation', data: event_data.detail}, '*')
|
|
559
|
+
// console.log("onNewConversation!", event_data);
|
|
560
|
+
window.parent.postMessage({ source: 'widget', event: 'onNewConversation', data: { conversation_id: event_data.detail.newConvId } }, '*')
|
|
561
561
|
});
|
|
562
562
|
|
|
563
563
|
window.addEventListener('message', (event_data)=> {
|