@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
package/package.json
CHANGED
|
@@ -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.
|
|
543
|
-
this.
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
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) => {
|