@chat21/chat21-ionic 3.0.82-rc.7 → 3.0.82
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 +5 -99
- package/README.md +2 -2
- package/package.json +3 -4
- package/src/app/app.component.html +1 -7
- package/src/app/app.component.scss +2 -20
- package/src/app/app.component.ts +18 -129
- package/src/app/app.module.ts +1 -3
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +1 -8
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +23 -77
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +88 -171
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -40
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +24 -11
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -6
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +25 -16
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +1 -5
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +15 -22
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +5 -25
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +1 -2
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +15 -14
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +5 -24
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +1 -6
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +13 -12
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +5 -26
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +2 -8
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +0 -36
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +2 -3
- package/src/app/chatlib/conversation-detail/message/image/image.component.scss +5 -17
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -3
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +6 -16
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +3 -1
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -63
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
- package/src/app/components/canned-response/canned-response.component.html +9 -9
- package/src/app/components/canned-response/canned-response.component.scss +7 -14
- package/src/app/components/canned-response/canned-response.component.ts +1 -1
- package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
- package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.spec.ts → conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts} +6 -6
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +8 -17
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +84 -24
- package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
- package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts → conversation-detail/option-header/option-header.component.spec.ts} +5 -5
- package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts → conversation-detail/option-header/option-header.component.ts} +4 -5
- package/src/app/components/conversation-info/info-content/info-content.component.html +4 -8
- package/src/app/components/conversation-info/info-content/info-content.component.ts +6 -3
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +13 -7
- package/src/app/components/conversation-info/info-direct/info-direct.component.scss +0 -23
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +6 -1
- package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
- package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
- package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.html +1 -2
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.ts +1 -0
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
- package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
- package/src/app/components/project-item/project-item.component.html +149 -98
- package/src/app/components/project-item/project-item.component.scss +35 -43
- package/src/app/components/project-item/project-item.component.ts +4 -16
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +5 -5
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +10 -23
- package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
- package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
- package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -47
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -41
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +112 -186
- package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
- package/src/app/pages/conversations-list/conversations-list.page.scss +2 -18
- package/src/app/pages/conversations-list/conversations-list.page.ts +22 -25
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
- package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
- package/src/app/pages/loader-preview/loader-preview.page.ts +2 -1
- package/src/app/pages/profile-info/profile-info.page.html +4 -2
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
- package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
- package/src/app/services/tiledesk/tiledesk.service.ts +25 -1
- package/src/app/services/websocket/websocket.service.ts +1 -1
- package/src/app/shared/shared.module.ts +33 -24
- package/src/assets/i18n/ar.json +265 -278
- package/src/assets/i18n/az.json +1 -14
- package/src/assets/i18n/de.json +2 -15
- package/src/assets/i18n/en.json +2 -15
- package/src/assets/i18n/es.json +2 -15
- package/src/assets/i18n/fr.json +1 -14
- package/src/assets/i18n/it.json +1 -14
- package/src/assets/i18n/kk.json +2 -15
- package/src/assets/i18n/pt.json +2 -15
- package/src/assets/i18n/ru.json +1 -14
- package/src/assets/i18n/sr.json +264 -277
- package/src/assets/i18n/sv.json +2 -15
- package/src/assets/i18n/tr.json +2 -15
- package/src/assets/i18n/uk.json +2 -15
- package/src/assets/i18n/uz.json +1 -14
- package/src/assets/js/chat21client.js +148 -175
- package/src/chat-config-mqtt-localhost.json +2 -2
- package/src/chat-config-native-mqtt.json +0 -3
- package/src/chat21-core/models/conversation.ts +1 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +8 -7
- package/src/chat21-core/utils/constants.ts +1 -6
- package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
- package/src/chat21-core/utils/utils.ts +10 -38
- package/src/global.scss +255 -52
- package/src/index.html +9 -0
- package/src/variables.scss +10 -30
- package/deploy_amazon_beta.sh +0 -29
- package/deploy_amazon_prod.sh +0 -30
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
- package/src/app/components/navbar/navbar.component.html +0 -103
- package/src/app/components/navbar/navbar.component.scss +0 -249
- package/src/app/components/navbar/navbar.component.ts +0 -190
- package/src/app/services/projects/projects.service.spec.ts +0 -12
- package/src/app/services/projects/projects.service.ts +0 -43
- package/src/assets/sounds/interface-start.mp3 +0 -0
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat21-core/models/projects.ts +0 -27
- package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
package/src/assets/i18n/sv.json
CHANGED
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
"LABEL_AVAILABLE": "tillgängligt",
|
|
6
6
|
"LABEL_NOT_AVAILABLE": "inte tillgänglig",
|
|
7
7
|
"LABEL_INACTIVE":"inaktiv",
|
|
8
|
-
"LABEL_ONLINE":"uppkopplad",
|
|
9
|
-
"LABEL_OFFLINE":"off-line",
|
|
10
8
|
"LABEL_NO_MSG_HERE": "Fortfarande inget meddelande här...",
|
|
11
9
|
"LABEL_TODAY": "i dag",
|
|
12
10
|
"LABEL_TOMORROW": "i går",
|
|
@@ -46,7 +44,6 @@
|
|
|
46
44
|
"LABEL_VIDEO_CHAT": "Videosamtal",
|
|
47
45
|
"LABEL_LEAVE_GROUP": "Lämna gruppen",
|
|
48
46
|
"LABEL_CLOSE_GROUP": "Stänga",
|
|
49
|
-
"LABEL_OPEN_INFO_CONVERSATION":"Öppna konversationsinformation",
|
|
50
47
|
"ALERT_TITLE": "Uppmärksamhet!",
|
|
51
48
|
"CLOSE_ALERT_CONFIRM_LABEL": "OK",
|
|
52
49
|
"CLOSE_ALERT_CANCEL_LABEL": "ANNULLERA",
|
|
@@ -70,7 +67,7 @@
|
|
|
70
67
|
"INFO_SUPPORT_CHAT_CLOSED": "Chatten stängd",
|
|
71
68
|
"INFO_SUPPORT_LEAD_UPDATED":"Lead uppdaterad",
|
|
72
69
|
"INFO_SUPPORT_MEMBER_LEFT_GROUP":"borttagen från gruppen",
|
|
73
|
-
"INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"
|
|
70
|
+
"INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"lämnade samtalet",
|
|
74
71
|
"INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "En ny supportförfrågan har tilldelats dig",
|
|
75
72
|
"LABEL_PROFILE": "Profil",
|
|
76
73
|
"LABEL_CLOSE": "Stängd",
|
|
@@ -166,8 +163,6 @@
|
|
|
166
163
|
"WAITING_TIME_FOUND": "Teamet svarar vanligtvis med $reply_time",
|
|
167
164
|
"WAITING_TIME_NOT_FOUND": "Teamet kommer att svara så snart som möjligt",
|
|
168
165
|
"CLOSED": "STÄNGD",
|
|
169
|
-
"DIRECT_CHAT":"Direkt chatt",
|
|
170
|
-
"GROUP_CHAT":"Gruppchatt",
|
|
171
166
|
"PleaseSelectChatToStartMessaging": "Välj en chatt för att börja skicka meddelanden",
|
|
172
167
|
"FromThisAreNew": "------------------",
|
|
173
168
|
"Preview": "Förhandsvisning",
|
|
@@ -268,13 +263,5 @@
|
|
|
268
263
|
"First_name_of_agent": "Agentens förnamn",
|
|
269
264
|
"EnterCannedResponseTitle": "Ange standardsvarstitel",
|
|
270
265
|
"WriteMsgToSendToYourVisitors": "Skriv ett standardsvarsmeddelande att skicka till dina besökare",
|
|
271
|
-
"EditProfile": "Redigera profil"
|
|
272
|
-
"NAVBAR":{
|
|
273
|
-
"SIMULATE_VISITOR":"Simulera besökare",
|
|
274
|
-
"PROJECT_SETTINGS":"Projektinställningar",
|
|
275
|
-
"VIEW_ALL_PROJECTS":"Se alla projekt",
|
|
276
|
-
"ADD_PROJECT":"Lägg till projekt",
|
|
277
|
-
"RECENT_PROJECTS":"Nyliga projekt",
|
|
278
|
-
"OTHER_PROJECTS":"Andra projekt"
|
|
279
|
-
}
|
|
266
|
+
"EditProfile": "Redigera profil"
|
|
280
267
|
}
|
package/src/assets/i18n/tr.json
CHANGED
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
"LABEL_AVAILABLE": "mevcut",
|
|
6
6
|
"LABEL_NOT_AVAILABLE": "müsait değil",
|
|
7
7
|
"LABEL_INACTIVE":"etkin değil",
|
|
8
|
-
"LABEL_ONLINE":"internet üzerinden",
|
|
9
|
-
"LABEL_OFFLINE":"çevrimdışı",
|
|
10
8
|
"LABEL_NO_MSG_HERE": "Hala mesaj yok...",
|
|
11
9
|
"LABEL_TODAY": "bugün",
|
|
12
10
|
"LABEL_TOMORROW": "dün",
|
|
@@ -46,7 +44,6 @@
|
|
|
46
44
|
"LABEL_VIDEO_CHAT": "Görüntülü arama",
|
|
47
45
|
"LABEL_LEAVE_GROUP": "Gruptan ayrıl",
|
|
48
46
|
"LABEL_CLOSE_GROUP": "Kapat",
|
|
49
|
-
"LABEL_OPEN_INFO_CONVERSATION":"Görüşme ayrıntılarını aç",
|
|
50
47
|
"ALERT_TITLE": "Dikkat!",
|
|
51
48
|
"CLOSE_ALERT_CONFIRM_LABEL": "Tamam",
|
|
52
49
|
"CLOSE_ALERT_CANCEL_LABEL": "İPTAL ET",
|
|
@@ -70,7 +67,7 @@
|
|
|
70
67
|
"INFO_SUPPORT_CHAT_CLOSED": "sohbet kapatıldı",
|
|
71
68
|
"INFO_SUPPORT_LEAD_UPDATED":"Potansiyel müşteri güncellendi",
|
|
72
69
|
"INFO_SUPPORT_MEMBER_LEFT_GROUP":"gruptan kaldırıldı",
|
|
73
|
-
"INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"
|
|
70
|
+
"INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"konuşmayı bıraktı",
|
|
74
71
|
"INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "Size yeni bir destek talebi atandı",
|
|
75
72
|
"LABEL_PROFILE": "Profil",
|
|
76
73
|
"LABEL_CLOSE": "Kapalı",
|
|
@@ -166,8 +163,6 @@
|
|
|
166
163
|
"WAITING_TIME_FOUND": "Ekip genellikle $reply_time",
|
|
167
164
|
"WAITING_TIME_NOT_FOUND": "Ekip en kısa sürede cevap verecektir",
|
|
168
165
|
"CLOSED": "KAPALI",
|
|
169
|
-
"DIRECT_CHAT":"Doğrudan sohbet",
|
|
170
|
-
"GROUP_CHAT":"Grup Sohbeti",
|
|
171
166
|
"PleaseSelectChatToStartMessaging": "Mesajlaşmaya başlamak için lütfen bir sohbet seçin",
|
|
172
167
|
"FromThisAreNew": "------------------",
|
|
173
168
|
"Preview": "Ön izleme",
|
|
@@ -268,13 +263,5 @@
|
|
|
268
263
|
"First_name_of_agent": "Ajanın adı",
|
|
269
264
|
"EnterCannedResponseTitle": "Hazır yanıt başlığını girin",
|
|
270
265
|
"WriteMsgToSendToYourVisitors": "Ziyaretçilerinize göndermek için hazır bir yanıt mesajı yazın",
|
|
271
|
-
"EditProfile": "Profili Düzenle"
|
|
272
|
-
"NAVBAR":{
|
|
273
|
-
"SIMULATE_VISITOR":"Ziyaretçiyi simüle et",
|
|
274
|
-
"PROJECT_SETTINGS":"Proje ayarları",
|
|
275
|
-
"VIEW_ALL_PROJECTS":"Tüm projeleri görüntüle",
|
|
276
|
-
"ADD_PROJECT":"Proje ekle",
|
|
277
|
-
"RECENT_PROJECTS":"Son Projeler",
|
|
278
|
-
"OTHER_PROJECTS":"Diğer projeler"
|
|
279
|
-
}
|
|
266
|
+
"EditProfile": "Profili Düzenle"
|
|
280
267
|
}
|
package/src/assets/i18n/uk.json
CHANGED
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
"LABEL_AVAILABLE": "доступний",
|
|
6
6
|
"LABEL_NOT_AVAILABLE": "недоступний",
|
|
7
7
|
"LABEL_INACTIVE":"неактивний",
|
|
8
|
-
"LABEL_ONLINE":"онлайн",
|
|
9
|
-
"LABEL_OFFLINE":"офлайн",
|
|
10
8
|
"LABEL_NO_MSG_HERE": "Тут досі немає повідомлення...",
|
|
11
9
|
"LABEL_TODAY": "сьогодні",
|
|
12
10
|
"LABEL_TOMORROW": "вчора",
|
|
@@ -46,7 +44,6 @@
|
|
|
46
44
|
"LABEL_VIDEO_CHAT": "Відеодзвінок",
|
|
47
45
|
"LABEL_LEAVE_GROUP": "Вийти з групи",
|
|
48
46
|
"LABEL_CLOSE_GROUP": "Закрити",
|
|
49
|
-
"LABEL_OPEN_INFO_CONVERSATION":"Відкрити деталі розмови",
|
|
50
47
|
"ALERT_TITLE": "Увага!",
|
|
51
48
|
"CLOSE_ALERT_CONFIRM_LABEL": "добре",
|
|
52
49
|
"CLOSE_ALERT_CANCEL_LABEL": "СКАСУВАТИ",
|
|
@@ -70,7 +67,7 @@
|
|
|
70
67
|
"INFO_SUPPORT_CHAT_CLOSED": "Чат закритий",
|
|
71
68
|
"INFO_SUPPORT_LEAD_UPDATED":"Лід оновлено",
|
|
72
69
|
"INFO_SUPPORT_MEMBER_LEFT_GROUP":"видалено з групи",
|
|
73
|
-
"INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"залишив
|
|
70
|
+
"INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"залишив розмову",
|
|
74
71
|
"INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "Вам призначено новий запит на підтримку",
|
|
75
72
|
"LABEL_PROFILE": "Профіль",
|
|
76
73
|
"LABEL_CLOSE": "зачинено",
|
|
@@ -166,8 +163,6 @@
|
|
|
166
163
|
"WAITING_TIME_FOUND": "Команда зазвичай відповідає $ час відповіді",
|
|
167
164
|
"WAITING_TIME_NOT_FOUND": "Команда відповість якомога швидше",
|
|
168
165
|
"CLOSED": "ЗАЧИНЕНО",
|
|
169
|
-
"DIRECT_CHAT":"Прямий чат",
|
|
170
|
-
"GROUP_CHAT":"Груповий чат",
|
|
171
166
|
"PleaseSelectChatToStartMessaging": "Виберіть чат, щоб почати обмін повідомленнями",
|
|
172
167
|
"FromThisAreNew": "------------------",
|
|
173
168
|
"Preview": "Попередній перегляд",
|
|
@@ -268,13 +263,5 @@
|
|
|
268
263
|
"First_name_of_agent": "Ім'я агента",
|
|
269
264
|
"EnterCannedResponseTitle": "Введіть назву готової відповіді",
|
|
270
265
|
"WriteMsgToSendToYourVisitors": "Напишіть готове повідомлення-відповідь, щоб надіслати його відвідувачам",
|
|
271
|
-
"EditProfile": "Редагувати профіль"
|
|
272
|
-
"NAVBAR":{
|
|
273
|
-
"SIMULATE_VISITOR":"Імітація відвідувача",
|
|
274
|
-
"PROJECT_SETTINGS":"Налаштування проекту",
|
|
275
|
-
"VIEW_ALL_PROJECTS":"Переглянути всі проекти",
|
|
276
|
-
"ADD_PROJECT":"Додати проект",
|
|
277
|
-
"RECENT_PROJECTS":"Останні проекти",
|
|
278
|
-
"OTHER_PROJECTS":"Інші проекти"
|
|
279
|
-
}
|
|
266
|
+
"EditProfile": "Редагувати профіль"
|
|
280
267
|
}
|
package/src/assets/i18n/uz.json
CHANGED
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
"LABEL_AVAILABLE": "mavjud",
|
|
7
7
|
"LABEL_NOT_AVAILABLE": "mavjud emas",
|
|
8
8
|
"LABEL_INACTIVE":"harakatsiz",
|
|
9
|
-
"LABEL_ONLINE":"onlayn",
|
|
10
|
-
"LABEL_OFFLINE":"oflayn",
|
|
11
9
|
"LABEL_NO_MSG_HERE": "Bu yerda hali xabar yo'q...",
|
|
12
10
|
"LABEL_TODAY": "Bugun",
|
|
13
11
|
"LABEL_TOMORROW": "kecha",
|
|
@@ -47,7 +45,6 @@
|
|
|
47
45
|
"LABEL_VIDEO_CHAT": "Video qo'ng'iroq",
|
|
48
46
|
"LABEL_LEAVE_GROUP": "Guruhni tark eting",
|
|
49
47
|
"LABEL_CLOSE_GROUP": "Yopish",
|
|
50
|
-
"LABEL_OPEN_INFO_CONVERSATION":"Suhbat tafsilotlarini oching",
|
|
51
48
|
"ALERT_TITLE": "Diqqat!",
|
|
52
49
|
"CLOSE_ALERT_CONFIRM_LABEL": "OK",
|
|
53
50
|
"CLOSE_ALERT_CANCEL_LABEL": "BEKOR",
|
|
@@ -167,8 +164,6 @@
|
|
|
167
164
|
"WAITING_TIME_FOUND": "Jamoa odatda $reply_timebilan javob beradi",
|
|
168
165
|
"WAITING_TIME_NOT_FOUND": "Jamoa imkon qadar tezroq javob beradi",
|
|
169
166
|
"CLOSED": "YOPIQ",
|
|
170
|
-
"DIRECT_CHAT":"To'g'ridan-to'g'ri suhbat",
|
|
171
|
-
"GROUP_CHAT":"Guruh suhbati",
|
|
172
167
|
"PleaseSelectChatToStartMessaging": "Xabar yozishni boshlash uchun chatni tanlang",
|
|
173
168
|
"FromThisAreNew": "------------------",
|
|
174
169
|
"Preview": "Ko‘rib chiqish",
|
|
@@ -269,13 +264,5 @@
|
|
|
269
264
|
"First_name_of_agent": "Agentning ismi",
|
|
270
265
|
"EnterCannedResponseTitle": "Tayyor javob sarlavhasini kiriting",
|
|
271
266
|
"WriteMsgToSendToYourVisitors": "Mehmonlaringizga yuborish uchun konservalangan javob xabarini yozing",
|
|
272
|
-
"EditProfile": "Profilni tahrirlash"
|
|
273
|
-
"NAVBAR":{
|
|
274
|
-
"SIMULATE_VISITOR":"Mehmonni simulyatsiya qilish",
|
|
275
|
-
"PROJECT_SETTINGS":"Loyiha sozlamalari",
|
|
276
|
-
"VIEW_ALL_PROJECTS":"Barcha loyihalarni ko'rish",
|
|
277
|
-
"ADD_PROJECT":"Loyiha qo'shish",
|
|
278
|
-
"RECENT_PROJECTS":"So'nggi loyihalar",
|
|
279
|
-
"OTHER_PROJECTS":"Boshqa loyihalar"
|
|
280
|
-
}
|
|
267
|
+
"EditProfile": "Profilni tahrirlash"
|
|
281
268
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
Chat21Client
|
|
3
3
|
|
|
4
|
-
v0.1.
|
|
4
|
+
v0.1.11
|
|
5
5
|
|
|
6
6
|
@Author Andrea Sponziello
|
|
7
7
|
(c) Tiledesk 2020
|
|
@@ -22,7 +22,7 @@ class Chat21Client {
|
|
|
22
22
|
this.client = null;
|
|
23
23
|
this.reconnections = 0 // just to check how many reconnections
|
|
24
24
|
this.client_id = this.uuidv4();
|
|
25
|
-
this.log = options.
|
|
25
|
+
this.log = options._log ? true : false;
|
|
26
26
|
if (options && options.MQTTendpoint) {
|
|
27
27
|
if (options.MQTTendpoint.startsWith('/')) {
|
|
28
28
|
if (this.log) {
|
|
@@ -75,7 +75,7 @@ class Chat21Client {
|
|
|
75
75
|
this.connected = false
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
subscribeToMyConversations(
|
|
78
|
+
subscribeToMyConversations() { // MESSAGES ETC.
|
|
79
79
|
// WILDCARS:
|
|
80
80
|
// MQTT: https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices/
|
|
81
81
|
// RABBITMQ: https://www.cloudamqp.com/blog/2015-09-03-part4-rabbitmq-for-beginners-exchanges-routing-keys-bindings.html#topic-exchange
|
|
@@ -84,13 +84,9 @@ class Chat21Client {
|
|
|
84
84
|
console.log("subscribing to:", this.user_id, "topic", this.topic_inbox);
|
|
85
85
|
}
|
|
86
86
|
this.client.subscribe(this.topic_inbox, (err) => {
|
|
87
|
-
if (err) {
|
|
88
|
-
console.error("An error occurred while subscribing user", this.user_id, "on topic:", this.topic_inbox, "Error:", err);
|
|
89
|
-
}
|
|
90
87
|
if (this.log) {
|
|
91
88
|
console.log("subscribed to:", this.topic_inbox, " with err", err)
|
|
92
89
|
}
|
|
93
|
-
subscribedCallback();
|
|
94
90
|
});
|
|
95
91
|
}
|
|
96
92
|
|
|
@@ -131,9 +127,7 @@ class Chat21Client {
|
|
|
131
127
|
// callback - function (err)
|
|
132
128
|
// console.log("recipient_id:", recipient_id)
|
|
133
129
|
let dest_topic = `apps/${this.appid}/outgoing/users/${this.user_id}/messages/${recipient_id}/outgoing`
|
|
134
|
-
|
|
135
|
-
console.log("dest_topic:", dest_topic)
|
|
136
|
-
}
|
|
130
|
+
// console.log("dest_topic:", dest_topic)
|
|
137
131
|
// let outgoing_message = {
|
|
138
132
|
// text: text,
|
|
139
133
|
// type: type,
|
|
@@ -535,179 +529,172 @@ class Chat21Client {
|
|
|
535
529
|
this.onGroupUpdatedCallbacks.delete(handler);
|
|
536
530
|
}
|
|
537
531
|
|
|
538
|
-
start(
|
|
532
|
+
start() {
|
|
539
533
|
if (this.on_message_handler) {
|
|
540
|
-
|
|
541
|
-
console.log("this.on_message_handler already subscribed. Reconnected num", this.reconnections)
|
|
542
|
-
}
|
|
543
|
-
callbsubscribedCallbackack();
|
|
534
|
+
console.log("this.on_message_handler already subscribed. Reconnected num", this.reconnections)
|
|
544
535
|
return
|
|
545
536
|
}
|
|
546
|
-
this.subscribeToMyConversations(
|
|
547
|
-
|
|
548
|
-
|
|
537
|
+
this.subscribeToMyConversations()
|
|
538
|
+
// no more then one "on_message" handler, thanks.
|
|
539
|
+
this.on_message_handler = this.client.on('message', (topic, message) => {
|
|
540
|
+
// console.log("topic:" + topic + "\nmessage payload:" + message)
|
|
541
|
+
const _topic = this.parseTopic(topic)
|
|
542
|
+
if (!_topic) {
|
|
549
543
|
if (this.log) {
|
|
550
|
-
console.log("
|
|
544
|
+
console.log("Invalid message topic:", topic);
|
|
551
545
|
}
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
}
|
|
559
|
-
const conversWith = _topic.conversWith
|
|
560
|
-
try {
|
|
561
|
-
const message_json = JSON.parse(message.toString())
|
|
562
|
-
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
const conversWith = _topic.conversWith
|
|
549
|
+
try {
|
|
550
|
+
const message_json = JSON.parse(message.toString())
|
|
551
|
+
|
|
563
552
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
553
|
+
// TEMPORARILY DISABLED, ADDED-CONVERSATIONS ARE OBSERVED BY NEW MESSAGES.
|
|
554
|
+
// MOVED TO: this.onMessageAddedCallbacks
|
|
555
|
+
// if (this.onConversationAddedCallbacks) {
|
|
556
|
+
// if (topic.includes("/conversations/") && topic.endsWith(_CLIENTADDED)) {
|
|
557
|
+
// // map.forEach((value, key, map) =>)
|
|
558
|
+
// this.onConversationAddedCallbacks.forEach((callback, handler, map) => {
|
|
559
|
+
// callback(message_json, _topic)
|
|
560
|
+
// });
|
|
561
|
+
// }
|
|
562
|
+
// }
|
|
574
563
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
}
|
|
581
|
-
// map.forEach((value, key, map) =>)
|
|
582
|
-
this.onConversationUpdatedCallbacks.forEach((callback, handler, map) => {
|
|
583
|
-
callback(JSON.parse(message.toString()), _topic)
|
|
584
|
-
});
|
|
564
|
+
if (this.onConversationUpdatedCallbacks) {
|
|
565
|
+
// example topic: apps.tilechat.users.ME.conversations.CONVERS-WITH.clientdeleted
|
|
566
|
+
if (topic.includes("/conversations/") && topic.endsWith(_CLIENTUPDATED)) {
|
|
567
|
+
if (this.log) {
|
|
568
|
+
console.log("conversation updated! /conversations/, topic:", topic)
|
|
585
569
|
}
|
|
570
|
+
// map.forEach((value, key, map) =>)
|
|
571
|
+
this.onConversationUpdatedCallbacks.forEach((callback, handler, map) => {
|
|
572
|
+
callback(JSON.parse(message.toString()), _topic)
|
|
573
|
+
});
|
|
586
574
|
}
|
|
575
|
+
}
|
|
587
576
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
}
|
|
594
|
-
this.onConversationDeletedCallbacks.forEach((callback, handler, map) => {
|
|
595
|
-
callback(JSON.parse(message.toString()), _topic)
|
|
596
|
-
});
|
|
577
|
+
if (this.onConversationDeletedCallbacks) {
|
|
578
|
+
if (topic.includes("/conversations/") && topic.endsWith(_CLIENTDELETED)) {
|
|
579
|
+
// map.forEach((value, key, map) =>)
|
|
580
|
+
if (this.log) {
|
|
581
|
+
console.log("conversation deleted! /conversations/, topic:", topic, message.toString() );
|
|
597
582
|
}
|
|
583
|
+
this.onConversationDeletedCallbacks.forEach((callback, handler, map) => {
|
|
584
|
+
callback(JSON.parse(message.toString()), _topic)
|
|
585
|
+
});
|
|
598
586
|
}
|
|
587
|
+
}
|
|
599
588
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
}
|
|
589
|
+
if (this.onArchivedConversationAddedCallbacks) {
|
|
590
|
+
if (topic.includes("/archived_conversations/") && topic.endsWith(_CLIENTADDED)) {
|
|
591
|
+
// map.forEach((value, key, map) =>)
|
|
592
|
+
this.onArchivedConversationAddedCallbacks.forEach((callback, handler, map) => {
|
|
593
|
+
callback(JSON.parse(message.toString()), _topic)
|
|
594
|
+
});
|
|
607
595
|
}
|
|
596
|
+
}
|
|
608
597
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
598
|
+
if (this.onArchivedConversationDeletedCallbacks) {
|
|
599
|
+
if (topic.includes("/archived_conversations/") && topic.endsWith(_CLIENTDELETED)) {
|
|
600
|
+
// map.forEach((value, key, map) =>)
|
|
601
|
+
this.onArchivedConversationDeletedCallbacks.forEach((callback, handler, map) => {
|
|
602
|
+
callback(JSON.parse(message.toString()), _topic)
|
|
603
|
+
});
|
|
616
604
|
}
|
|
605
|
+
}
|
|
617
606
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
}
|
|
645
|
-
// }
|
|
607
|
+
// *********************************************************
|
|
608
|
+
// This snippet is important to get all messages and notify
|
|
609
|
+
// conversation > added (to create a conversation entry)
|
|
610
|
+
// *********************************************************
|
|
611
|
+
// if (this.onMessageAddedCallbacks) {
|
|
612
|
+
// console.log("ttttttttt")
|
|
613
|
+
if (topic.includes("/messages/") && topic.endsWith(_CLIENTADDED)) {
|
|
614
|
+
if (this.onMessageAddedCallbacks) {
|
|
615
|
+
this.onMessageAddedCallbacks.forEach((callback, handler, map) => {
|
|
616
|
+
callback(JSON.parse(message.toString()), _topic)
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
// Observing conversations added from messages
|
|
620
|
+
// console.log("Observing conversations added from messages", message_json);
|
|
621
|
+
// if (this.onConversationAddedCallbacks) {
|
|
622
|
+
// console.log("callbacks ok........");
|
|
623
|
+
let update_conversation = true;
|
|
624
|
+
if (message_json.attributes && message_json.attributes.updateconversation == false) {
|
|
625
|
+
update_conversation = false
|
|
626
|
+
}
|
|
627
|
+
// console.log("update_conversation........", update_conversation);
|
|
628
|
+
if (update_conversation && this.onConversationAddedCallbacks) {
|
|
629
|
+
this.onConversationAddedCallbacks.forEach((callback, handler, map) => {
|
|
630
|
+
message_json.is_new = true;
|
|
631
|
+
const message_for_conv_string = JSON.stringify(message_json);
|
|
632
|
+
callback(JSON.parse(message_for_conv_string), _topic)
|
|
633
|
+
});
|
|
646
634
|
}
|
|
647
635
|
// }
|
|
636
|
+
}
|
|
637
|
+
// }
|
|
648
638
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
}
|
|
639
|
+
if (this.onMessageUpdatedCallbacks) {
|
|
640
|
+
if (topic.includes("/messages/") && topic.endsWith(_CLIENTUPDATED)) {
|
|
641
|
+
this.onMessageUpdatedCallbacks.forEach((callback, handler, map) => {
|
|
642
|
+
callback(JSON.parse(message.toString()), _topic)
|
|
643
|
+
});
|
|
655
644
|
}
|
|
645
|
+
}
|
|
656
646
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
}
|
|
647
|
+
if (this.onGroupUpdatedCallbacks) {
|
|
648
|
+
if (topic.includes("/groups/") && topic.endsWith(_CLIENTUPDATED)) {
|
|
649
|
+
this.onGroupUpdatedCallbacks.forEach((callback, handler, map) => {
|
|
650
|
+
callback(JSON.parse(message.toString()), _topic)
|
|
651
|
+
});
|
|
663
652
|
}
|
|
653
|
+
}
|
|
664
654
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
}
|
|
655
|
+
// // ******* NEW!!
|
|
656
|
+
this.callbackHandlers.forEach((value, key, map) => {
|
|
657
|
+
const callback_obj = value
|
|
658
|
+
// callback_obj = {
|
|
659
|
+
// "type": "onMessageUpdatedForConversation",
|
|
660
|
+
// "conversWith": conversWith,
|
|
661
|
+
// "callback": callback
|
|
662
|
+
// }
|
|
663
|
+
const type = callback_obj.type
|
|
664
|
+
if (topic.includes("/messages/") && topic.endsWith(_CLIENTADDED)) {
|
|
665
|
+
if (this.log) { console.log("/messages/_CLIENTADDED") }
|
|
666
|
+
if (type === CALLBACK_TYPE_ON_MESSAGE_ADDED_FOR_CONVERSATION) {
|
|
667
|
+
if (conversWith === callback_obj.conversWith) {
|
|
668
|
+
if (this.log) { console.log("/messages/_CLIENTADDED on: ", conversWith)}
|
|
669
|
+
callback_obj.callback(JSON.parse(message.toString()), _topic)
|
|
681
670
|
}
|
|
682
671
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
672
|
+
}
|
|
673
|
+
if (topic.includes("/messages/") && topic.endsWith(_CLIENTUPDATED)) {
|
|
674
|
+
if (this.log) {console.log("/messages/_CLIENTUPDATED")}
|
|
675
|
+
if (type === CALLBACK_TYPE_ON_MESSAGE_UPDATED_FOR_CONVERSATION) {
|
|
676
|
+
if (conversWith === callback_obj.conversWith) {
|
|
677
|
+
console.log("/messages/_CLIENTUPDATED on: ", conversWith)
|
|
678
|
+
callback_obj.callback(JSON.parse(message.toString()), _topic)
|
|
690
679
|
}
|
|
691
680
|
}
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
681
|
+
}
|
|
682
|
+
})
|
|
683
|
+
|
|
684
|
+
// if (topic.includes("/messages/") && topic.endsWith(_CLIENTUPDATED)) {
|
|
685
|
+
// this.onMessageUpdatedInConversationCallbacks.forEach((obj, handler, map) => {
|
|
686
|
+
// if (conversWith === obj.conversWith) {
|
|
687
|
+
// callback(message_json, _topic)
|
|
688
|
+
// }
|
|
689
|
+
// });
|
|
690
|
+
// }
|
|
691
|
+
|
|
702
692
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
})
|
|
708
|
-
subscribedCallback();
|
|
693
|
+
}
|
|
694
|
+
catch (err) {
|
|
695
|
+
console.error("ERROR:", err)
|
|
696
|
+
}
|
|
709
697
|
})
|
|
710
|
-
|
|
711
698
|
// console.log("HANDLER_:", this.on_message_handler)
|
|
712
699
|
}
|
|
713
700
|
|
|
@@ -776,23 +763,14 @@ class Chat21Client {
|
|
|
776
763
|
}
|
|
777
764
|
|
|
778
765
|
conversationDetail(conversWith, callback) {
|
|
779
|
-
if (this.log) {
|
|
780
|
-
console.log("conversationDetail(). searching on user:", this.user_id, " - conversWith:", conversWith)
|
|
781
|
-
}
|
|
782
766
|
this.crossConversationDetail(conversWith, false, callback);
|
|
783
767
|
}
|
|
784
768
|
|
|
785
769
|
archivedConversationDetail(conversWith, callback) {
|
|
786
|
-
if (this.log) {
|
|
787
|
-
console.log("archivedConversationDetail(). searching on user:", this.user_id, " - conversWith:", conversWith)
|
|
788
|
-
}
|
|
789
770
|
this.crossConversationDetail(conversWith, true, callback);
|
|
790
771
|
}
|
|
791
772
|
|
|
792
773
|
crossConversationDetail(conversWith, archived, callback) {
|
|
793
|
-
if (this.log) {
|
|
794
|
-
console.log("searching on user:", this.user_id, " - conv of conversWith:", conversWith, " - archived:", archived)
|
|
795
|
-
}
|
|
796
774
|
let path = "conversations";
|
|
797
775
|
if (archived) {
|
|
798
776
|
path = "archived_conversations"
|
|
@@ -800,10 +778,8 @@ class Chat21Client {
|
|
|
800
778
|
// ex.: http://localhost:8004/tilechat/04-ANDREASPONZIELLO/conversations/CONVERS_WITH
|
|
801
779
|
//const URL = `${this.APIendpoint}/${this.appid}/${this.user_id}/conversations/${conversWith}`
|
|
802
780
|
const URL = `${this.APIendpoint}/${this.appid}/${this.user_id}/${path}/${conversWith}`
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
console.log("conversWith:", conversWith);
|
|
806
|
-
}
|
|
781
|
+
console.log("getting conversation detail:", URL)
|
|
782
|
+
console.log("conversWith:", conversWith)
|
|
807
783
|
|
|
808
784
|
let options = {
|
|
809
785
|
url: URL,
|
|
@@ -814,9 +790,7 @@ class Chat21Client {
|
|
|
814
790
|
method: 'GET'
|
|
815
791
|
}
|
|
816
792
|
Chat21Client.myrequest(options, (err, response, json) => {
|
|
817
|
-
|
|
818
|
-
console.log("JSON...", json);
|
|
819
|
-
}
|
|
793
|
+
console.log("JSON...", json)
|
|
820
794
|
if (json && json.result && Array.isArray(json.result) && json.result.length ==1) {
|
|
821
795
|
callback(null, json.result[0]);
|
|
822
796
|
}
|
|
@@ -990,13 +964,12 @@ class Chat21Client {
|
|
|
990
964
|
|
|
991
965
|
this.client.on('connect', // TODO if token is wrong it must reply with an error!
|
|
992
966
|
() => {
|
|
993
|
-
if (this.log) {console.log("
|
|
967
|
+
if (this.log) {console.log("chat client connected...")}
|
|
994
968
|
if (!this.connected) {
|
|
995
|
-
if (this.log) {console.log("Chat client first connection
|
|
969
|
+
if (this.log) {console.log("Chat client first connection.")}
|
|
996
970
|
this.connected = true
|
|
997
|
-
this.start(
|
|
998
|
-
|
|
999
|
-
});
|
|
971
|
+
this.start()
|
|
972
|
+
callback()
|
|
1000
973
|
}
|
|
1001
974
|
}
|
|
1002
975
|
);
|
|
@@ -1058,7 +1031,7 @@ class Chat21Client {
|
|
|
1058
1031
|
|
|
1059
1032
|
function isBrowser() {
|
|
1060
1033
|
return true;
|
|
1061
|
-
//
|
|
1034
|
+
//return false;
|
|
1062
1035
|
}
|
|
1063
1036
|
|
|
1064
1037
|
export { Chat21Client }; // Browser
|