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