@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
@@ -2,8 +2,6 @@
2
2
  version=`node -e 'console.log(require("./package.json").version)'`
3
3
  echo "version $version"
4
4
 
5
- ## Update package-lock.json
6
- npm install
7
5
 
8
6
  # Get curent branch name
9
7
  current_branch=$(git rev-parse --abbrev-ref HEAD)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-web-widget",
3
3
  "author": "Tiledesk SRL",
4
- "version": "5.0.94-rc2",
4
+ "version": "5.0.94-rc4",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -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("onMessageCreated!", event_data);
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)=> {