@chat21/chat21-web-widget 5.0.94-rc3 → 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,9 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
+ # 5.0.94-rc4
10
+ - **added**: publish onMessageCreated only if status is >= 100
11
+
9
12
  # 5.0.94-rc3
10
13
  - **bug-fixed**: if hiddenMessage exist, onNewConversation event is not fired
11
14
 
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-rc3",
4
+ "version": "5.0.94-rc4",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -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
  });