@chat21/chat21-ionic 3.4.7 → 3.4.8-rc.2

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,11 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.4.8-rc.2
4
+ - bug-fixed: if support group is a group, do not call lookup api
5
+
6
+ ### 3.4.8-rc.1
7
+ - bug-fixed: if support group is a group, do not call getRequest
8
+
3
9
  ### 3.4.7 in PROD
4
10
 
5
11
  ### 3.4.7-rc.2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.4.7",
4
+ "version": "3.4.8-rc.2",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -61,7 +61,8 @@ import {
61
61
  TYPE_MSG_EMAIL,
62
62
  TYPE_MSG_FORM,
63
63
  CHANNEL_TYPE,
64
- INFO_MESSAGE_TYPE
64
+ INFO_MESSAGE_TYPE,
65
+ TYPE_GROUP
65
66
  } from 'src/chat21-core/utils/constants'
66
67
  import {
67
68
  checkPlatformIsMobile,
@@ -528,7 +529,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
528
529
  this.initGroupsHandler();
529
530
  this.startConversation();
530
531
  this.initSubscriptions();
531
- this.getLeadDetail()
532
+ this.getLeadDetail();
532
533
  this.initializeTyping();
533
534
  }
534
535
  this.addEventsKeyboard()
@@ -538,17 +539,23 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
538
539
 
539
540
  _getProjectIdByConversationWith(conversationWith: string) {
540
541
  const tiledeskToken = this.tiledeskAuthService.getTiledeskToken()
541
- this.tiledeskService.getProjectIdByConvRecipient(tiledeskToken, conversationWith).subscribe((res) => {
542
- this.logger.log('[CONVS-DETAIL] - GET PROJECTID BY CONV RECIPIENT RES + projectId', res, res.id_project)
543
- if (res) {
544
- const projectId = res.id_project
545
- this.getProjectById(tiledeskToken, projectId)
546
- }
547
- }, (error) => {
548
- this.logger.error('[CONVS-DETAIL] - GET PROJECTID BY CONV RECIPIENT - ERROR ', error)
549
- }, () => {
550
- this.logger.log('[CONVS-DETAIL] - GET PROJECTID BY CONV RECIPIENT * COMPLETE *',)
551
- })
542
+ if (this.channelType !== TYPE_DIRECT && !this.conversationWith.startsWith('group-')) {
543
+ this.tiledeskService.getProjectIdByConvRecipient(tiledeskToken, conversationWith).subscribe((res) => {
544
+ this.logger.log('[CONVS-DETAIL] - GET PROJECTID BY CONV RECIPIENT RES + projectId', res, res.id_project)
545
+ if (res) {
546
+ const projectId = res.id_project
547
+ this.getProjectById(tiledeskToken, projectId)
548
+ }
549
+ }, (error) => {
550
+ this.logger.error('[CONVS-DETAIL] - GET PROJECTID BY CONV RECIPIENT - ERROR ',conversationWith, error)
551
+ }, () => {
552
+ this.logger.log('[CONVS-DETAIL] - GET PROJECTID BY CONV RECIPIENT * COMPLETE *',)
553
+ })
554
+ }else {
555
+ this.canShowCanned = false;
556
+ this.offlineMsgEmail = false;
557
+ }
558
+
552
559
  }
553
560
 
554
561
  getProjectById(tiledeskToken, projectId) {
@@ -904,7 +911,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
904
911
  this.archivedConversationsHandlerService.getConversationDetail(this.conversationWith, (conv) => {
905
912
  this.logger.debug('[CONV-COMP] setHeaderContent getConversationDetail: archivedConversationsHandlerService', this.conversationWith, conv)
906
913
  if (conv) {
907
- console.log('[CONVS-DETAIL] - setHeaderContent getConversationDetail (archived)', this.conversationWith, 'CONVS', conv)
914
+ this.logger.log('[CONVS-DETAIL] - setHeaderContent getConversationDetail (archived)', this.conversationWith, 'CONVS', conv)
908
915
  this.conversation = this.onConversationLoaded(conv)
909
916
  this.conversationAvatar = setConversationAvatar(
910
917
  conv.conversation_with,
@@ -971,7 +978,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
971
978
 
972
979
  getLeadDetail() {
973
980
  const that = this;
974
- if (this.channelType !== TYPE_DIRECT) {
981
+ if (this.channelType !== TYPE_DIRECT && !this.conversationWith.startsWith('group-')) {
975
982
  const tiledeskToken = this.tiledeskAuthService.getTiledeskToken();
976
983
  const projectId = getProjectIdSelectedConversation(this.conversationWith)
977
984
  this.logger.debug('[CONVS-DETAIL] getLeadDetail - section ', projectId)
@@ -60,7 +60,8 @@ import { avatarPlaceholder, getColorBck } from 'src/chat21-core/utils/utils-user
60
60
  this.logger.log('Method not implemented.');
61
61
  return;
62
62
  }
63
- // abstract onGroupChange(groupId: string): Observable<GroupModel>;
63
+
64
+ // abstract onGroupChange(groupId: string): Observable<GroupModel>;
64
65
  onGroupChange(groupId: string): Observable<GroupModel> {
65
66
  if (this.isGroup(groupId)) {
66
67
  this.chat21Service.chatClient.groupData(groupId, (err, group) => {