@chat21/chat21-ionic 3.4.8-rc.1 → 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,8 @@
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
+
3
6
  ### 3.4.8-rc.1
4
7
  - bug-fixed: if support group is a group, do not call getRequest
5
8
 
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.8-rc.1",
4
+ "version": "3.4.8-rc.2",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -539,17 +539,23 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
539
539
 
540
540
  _getProjectIdByConversationWith(conversationWith: string) {
541
541
  const tiledeskToken = this.tiledeskAuthService.getTiledeskToken()
542
- this.tiledeskService.getProjectIdByConvRecipient(tiledeskToken, conversationWith).subscribe((res) => {
543
- this.logger.log('[CONVS-DETAIL] - GET PROJECTID BY CONV RECIPIENT RES + projectId', res, res.id_project)
544
- if (res) {
545
- const projectId = res.id_project
546
- this.getProjectById(tiledeskToken, projectId)
547
- }
548
- }, (error) => {
549
- this.logger.error('[CONVS-DETAIL] - GET PROJECTID BY CONV RECIPIENT - ERROR ', error)
550
- }, () => {
551
- this.logger.log('[CONVS-DETAIL] - GET PROJECTID BY CONV RECIPIENT * COMPLETE *',)
552
- })
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
+
553
559
  }
554
560
 
555
561
  getProjectById(tiledeskToken, projectId) {
@@ -905,7 +911,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
905
911
  this.archivedConversationsHandlerService.getConversationDetail(this.conversationWith, (conv) => {
906
912
  this.logger.debug('[CONV-COMP] setHeaderContent getConversationDetail: archivedConversationsHandlerService', this.conversationWith, conv)
907
913
  if (conv) {
908
- console.log('[CONVS-DETAIL] - setHeaderContent getConversationDetail (archived)', this.conversationWith, 'CONVS', conv)
914
+ this.logger.log('[CONVS-DETAIL] - setHeaderContent getConversationDetail (archived)', this.conversationWith, 'CONVS', conv)
909
915
  this.conversation = this.onConversationLoaded(conv)
910
916
  this.conversationAvatar = setConversationAvatar(
911
917
  conv.conversation_with,
@@ -972,7 +978,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
972
978
 
973
979
  getLeadDetail() {
974
980
  const that = this;
975
- if (this.channelType !== TYPE_DIRECT && this.channelType !== TYPE_GROUP) {
981
+ if (this.channelType !== TYPE_DIRECT && !this.conversationWith.startsWith('group-')) {
976
982
  const tiledeskToken = this.tiledeskAuthService.getTiledeskToken();
977
983
  const projectId = getProjectIdSelectedConversation(this.conversationWith)
978
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) => {