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