isometrik-plugin-chat-sdk 2.0.4 → 2.0.7
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/dist/cjs/admin-transfer-dialog.cjs.entry.js +44 -0
- package/dist/cjs/admin-transfer-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/{app-globals-61a8bfde.js → app-globals-c433d8a6.js} +4 -4
- package/dist/cjs/{app-globals-61a8bfde.js.map → app-globals-c433d8a6.js.map} +1 -1
- package/dist/cjs/attachment-preview_22.cjs.entry.js +220 -99
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/audio-bubble_4.cjs.entry.js +9 -9
- package/dist/cjs/chat-app.cjs.entry.js +1 -1
- package/dist/cjs/chat-document-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/chat-image-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/chat-video-message-bubble.cjs.entry.js +1 -1
- package/dist/cjs/delete-message.cjs.entry.js +1 -1
- package/dist/cjs/{drawer-811d2ce8.js → drawer-960b3f5d.js} +3 -1
- package/dist/cjs/drawer-960b3f5d.js.map +1 -0
- package/dist/cjs/forward-memebers.cjs.entry.js +3 -3
- package/dist/cjs/forward-message.cjs.entry.js +2 -2
- package/dist/cjs/group-admin-leave-b5cfdb33.js +55 -0
- package/dist/cjs/group-admin-leave-b5cfdb33.js.map +1 -0
- package/dist/cjs/{send-media-14908d4b.js → groupcast-5e3d49c4.js} +1 -127
- package/dist/cjs/groupcast-5e3d49c4.js.map +1 -0
- package/dist/cjs/index.cjs.js +9 -9
- package/dist/cjs/isometrik-webchat.cjs.js +5 -5
- package/dist/cjs/link-preview.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/login-page_3.cjs.entry.js +57 -52
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/cjs/member-add.cjs.entry.js +4 -4
- package/dist/cjs/message-bubble.cjs.entry.js +2 -2
- package/dist/cjs/my-component.cjs.entry.js +1 -1
- package/dist/cjs/{profile-avatar_2.cjs.entry.js → profile-avatar.cjs.entry.js} +1 -25
- package/dist/cjs/profile-avatar.cjs.entry.js.map +1 -0
- package/dist/cjs/reaction-container.cjs.entry.js +2 -2
- package/dist/cjs/{runtime-controls-201c71ba.js → runtime-controls-95f6cb3b.js} +23 -21
- package/dist/cjs/runtime-controls-95f6cb3b.js.map +1 -0
- package/dist/cjs/send-media-37e09e83.js +357 -0
- package/dist/cjs/send-media-37e09e83.js.map +1 -0
- package/dist/cjs/share-popup.cjs.entry.js +1 -1
- package/dist/cjs/spinner-loader.cjs.entry.js +32 -0
- package/dist/cjs/spinner-loader.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ChatUIComponent/AddMember.js +3 -3
- package/dist/collection/components/ChatUIComponent/ChatDocumentMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatImageMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +45 -17
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ChatVideoMessageBubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +15 -16
- package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js +22 -7
- package/dist/collection/components/ChatUIComponent/Header/WebChatHeader.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/ReactionContainer.js +2 -2
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +39 -18
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/AudioBubble/AudioBubble.js +3 -3
- package/dist/collection/components/ChatUIComponent/shared/ForwardMessageList/ForwardMessageList.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/admin-transfer-dialog/admin-transfer-dialog.js +101 -0
- package/dist/collection/components/ChatUIComponent/shared/admin-transfer-dialog/admin-transfer-dialog.js.map +1 -0
- package/dist/collection/components/ChatUIComponent/shared/attachment-preview/attachment-preview.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/block chatlist/BlockChatList.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/chat-loading-placeholder/chat-loading-placeholder.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js +10 -4
- package/dist/collection/components/ChatUIComponent/shared/contact-info/contact-info.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/delete-message/delete-message.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/document-message/document-message.js +3 -3
- package/dist/collection/components/ChatUIComponent/shared/forward-message/forward-message.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/image-message/image-message.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/incoming-text-message-bubble/incoming-text-message-bubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/index.js +1 -0
- package/dist/collection/components/ChatUIComponent/shared/index.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/link-preview/link-preview.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-bubble/message-bubble.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/message-date-pill/message-date-pill.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-info/message-info.js +6 -2
- package/dist/collection/components/ChatUIComponent/shared/message-info/message-info.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/shared/message-search/message-search.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble/outgoing-text-message-bubble.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/profile sidebar/profile-sidebar.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/profile-info/profile-info.js +2 -2
- package/dist/collection/components/ChatUIComponent/shared/reply-block/reply-block.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/reply-message-container/reply-message-container.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/share-popup/share-popup.js +1 -1
- package/dist/collection/components/ChatUIComponent/shared/video-message/video-message.js +2 -2
- package/dist/collection/components/chat-main.js +1 -1
- package/dist/collection/components/my-component/my-component.js +1 -1
- package/dist/collection/components/my-component/web-chat/event-handlers.js +5 -0
- package/dist/collection/components/my-component/web-chat/event-handlers.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/mqtt-host.js +9 -9
- package/dist/collection/components/my-component/web-chat/mqtt-host.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/offline-host.js +7 -6
- package/dist/collection/components/my-component/web-chat/offline-host.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/public-send.js +3 -3
- package/dist/collection/components/my-component/web-chat/public-send.js.map +1 -1
- package/dist/collection/lib/chat/index.js +2 -2
- package/dist/collection/lib/chat/index.js.map +1 -1
- package/dist/collection/lib/chat/messages.js +36 -0
- package/dist/collection/lib/chat/messages.js.map +1 -1
- package/dist/collection/lib/chat/send-media.js +30 -5
- package/dist/collection/lib/chat/send-media.js.map +1 -1
- package/dist/collection/lib/drawer.js +3 -0
- package/dist/collection/lib/drawer.js.map +1 -1
- package/dist/collection/lib/group-admin-leave.js +47 -0
- package/dist/collection/lib/group-admin-leave.js.map +1 -0
- package/dist/collection/lib/prompt-exit-group.js +59 -0
- package/dist/collection/lib/prompt-exit-group.js.map +1 -0
- package/dist/collection/sdk/headless-api.js +3 -1
- package/dist/collection/sdk/headless-api.js.map +1 -1
- package/dist/components/AudioBubble.js +3 -3
- package/dist/components/BlockChatList.js +1 -1
- package/dist/components/ChatFooter.js +15 -16
- package/dist/components/ChatFooter.js.map +1 -1
- package/dist/components/ChatSidebar.js +46 -18
- package/dist/components/ChatSidebar.js.map +1 -1
- package/dist/components/WebChat.js +27 -21
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +39 -18
- package/dist/components/WebChatBody.js.map +1 -1
- package/dist/components/WebChatHeader.js +23 -8
- package/dist/components/WebChatHeader.js.map +1 -1
- package/dist/components/WebchatRightSide.js +4 -35
- package/dist/components/WebchatRightSide.js.map +1 -1
- package/dist/components/admin-transfer-dialog.d.ts +11 -0
- package/dist/components/admin-transfer-dialog.js +69 -0
- package/dist/components/admin-transfer-dialog.js.map +1 -0
- package/dist/components/attachment-preview2.js +1 -1
- package/dist/components/chat-app.js +1 -1
- package/dist/components/chat-document-message-bubble.js +1 -1
- package/dist/components/chat-image-message-bubble.js +1 -1
- package/dist/components/chat-loading-placeholder2.js +1 -1
- package/dist/components/chat-video-message-bubble.js +1 -1
- package/dist/components/client.js +1 -121
- package/dist/components/client.js.map +1 -1
- package/dist/components/contact-info2.js +11 -5
- package/dist/components/contact-info2.js.map +1 -1
- package/dist/components/conversation.js +2 -283
- package/dist/components/conversation.js.map +1 -1
- package/dist/components/delete-message.js +1 -1
- package/dist/components/document-message2.js +3 -3
- package/dist/components/drawer.js +2 -0
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/forward-memebers.js +2 -2
- package/dist/components/forward-message.js +2 -2
- package/dist/components/group-admin-leave.js +50 -0
- package/dist/components/group-admin-leave.js.map +1 -0
- package/dist/components/group-members.js +298 -26
- package/dist/components/group-members.js.map +1 -1
- package/dist/components/group-members2.js +37 -0
- package/dist/components/group-members2.js.map +1 -0
- package/dist/components/image-message2.js +1 -1
- package/dist/components/incoming-text-message-bubble2.js +1 -1
- package/dist/components/index.js +6 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/link-preview2.js +1 -1
- package/dist/components/member-add.js +4 -4
- package/dist/components/message-bubble2.js +2 -2
- package/dist/components/message-date-pill2.js +1 -1
- package/dist/components/message-info2.js +6 -2
- package/dist/components/message-info2.js.map +1 -1
- package/dist/components/message-search2.js +1 -1
- package/dist/components/messages.js +37 -1
- package/dist/components/messages.js.map +1 -1
- package/dist/components/my-component.js +1 -1
- package/dist/components/outgoing-text-message-bubble2.js +1 -1
- package/dist/components/profile-info2.js +2 -2
- package/dist/components/profile-sidebar2.js +1 -1
- package/dist/components/prompt-exit-group.js +73 -0
- package/dist/components/prompt-exit-group.js.map +1 -0
- package/dist/components/reaction-container.js +2 -2
- package/dist/components/reply-block2.js +1 -1
- package/dist/components/reply-message-container2.js +1 -1
- package/dist/components/send-media.js +150 -0
- package/dist/components/send-media.js.map +1 -0
- package/dist/components/share-popup.js +1 -1
- package/dist/components/video-message2.js +2 -2
- package/dist/esm/admin-transfer-dialog.entry.js +40 -0
- package/dist/esm/admin-transfer-dialog.entry.js.map +1 -0
- package/dist/esm/{app-globals-2beecb81.js → app-globals-dfce8a5b.js} +3 -3
- package/dist/esm/{app-globals-2beecb81.js.map → app-globals-dfce8a5b.js.map} +1 -1
- package/dist/esm/attachment-preview_22.entry.js +209 -88
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/audio-bubble_4.entry.js +9 -9
- package/dist/esm/chat-app.entry.js +1 -1
- package/dist/esm/chat-document-message-bubble.entry.js +1 -1
- package/dist/esm/chat-image-message-bubble.entry.js +1 -1
- package/dist/esm/chat-video-message-bubble.entry.js +1 -1
- package/dist/esm/delete-message.entry.js +1 -1
- package/dist/esm/{drawer-74c188f1.js → drawer-d54c2f10.js} +3 -1
- package/dist/esm/drawer-d54c2f10.js.map +1 -0
- package/dist/esm/forward-memebers.entry.js +3 -3
- package/dist/esm/forward-message.entry.js +2 -2
- package/dist/esm/group-admin-leave-a60b9b1a.js +50 -0
- package/dist/esm/group-admin-leave-a60b9b1a.js.map +1 -0
- package/dist/esm/{send-media-917dcc2f.js → groupcast-58a59d64.js} +2 -122
- package/dist/esm/groupcast-58a59d64.js.map +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/isometrik-webchat.js +5 -5
- package/dist/esm/link-preview.entry.js +1 -1
- package/dist/esm/loader.js +5 -5
- package/dist/esm/login-page_3.entry.js +24 -19
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/member-add.entry.js +4 -4
- package/dist/esm/message-bubble.entry.js +2 -2
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/{profile-avatar_2.entry.js → profile-avatar.entry.js} +2 -25
- package/dist/esm/profile-avatar.entry.js.map +1 -0
- package/dist/esm/reaction-container.entry.js +2 -2
- package/dist/esm/{runtime-controls-cf599fe2.js → runtime-controls-ec6d5c75.js} +5 -3
- package/dist/esm/runtime-controls-ec6d5c75.js.map +1 -0
- package/dist/esm/send-media-a946c6dd.js +332 -0
- package/dist/esm/send-media-a946c6dd.js.map +1 -0
- package/dist/esm/share-popup.entry.js +1 -1
- package/dist/esm/spinner-loader.entry.js +28 -0
- package/dist/esm/spinner-loader.entry.js.map +1 -0
- package/dist/isometrik-webchat/index.esm.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -1
- package/dist/isometrik-webchat/{p-a876991d.entry.js → p-0ccfbe90.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-1854b156.entry.js → p-161fcb35.entry.js} +2 -2
- package/dist/isometrik-webchat/p-1953573d.js +2 -0
- package/dist/isometrik-webchat/p-1953573d.js.map +1 -0
- package/dist/isometrik-webchat/{p-a43ad157.entry.js → p-1eecc7c5.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-fdd327f5.entry.js → p-2195b0c0.entry.js} +2 -2
- package/dist/isometrik-webchat/p-2e9974e1.entry.js +2 -0
- package/dist/isometrik-webchat/p-30dc94e0.js +2 -0
- package/dist/isometrik-webchat/p-30dc94e0.js.map +1 -0
- package/dist/isometrik-webchat/{p-c1e8c38e.entry.js → p-3664e0ad.entry.js} +2 -2
- package/dist/isometrik-webchat/p-3f355f9e.js +2 -0
- package/dist/isometrik-webchat/p-3f355f9e.js.map +1 -0
- package/dist/isometrik-webchat/p-46dcd38f.js +2 -0
- package/dist/isometrik-webchat/p-46dcd38f.js.map +1 -0
- package/dist/isometrik-webchat/p-46e0048e.js +2 -0
- package/dist/isometrik-webchat/p-46e0048e.js.map +1 -0
- package/dist/isometrik-webchat/p-48ce4dca.entry.js +2 -0
- package/dist/isometrik-webchat/{p-d720cf14.entry.js → p-76341adb.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-2d3e8cd4.entry.js → p-7af9a7f3.entry.js} +2 -2
- package/dist/isometrik-webchat/p-7b25f234.entry.js +2 -0
- package/dist/isometrik-webchat/p-7b25f234.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-84424caa.entry.js +2 -0
- package/dist/isometrik-webchat/p-84424caa.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-86be30fe.js +2 -0
- package/dist/isometrik-webchat/p-9db196a4.entry.js +2 -0
- package/dist/isometrik-webchat/p-9db196a4.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-ad02a8ca.entry.js +2 -0
- package/dist/isometrik-webchat/p-c5bff6a1.entry.js +2 -0
- package/dist/isometrik-webchat/p-c5bff6a1.entry.js.map +1 -0
- package/dist/isometrik-webchat/p-c83e2d5d.entry.js +2 -0
- package/dist/isometrik-webchat/{p-fb705915.entry.js → p-cc5b86e6.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-f1fbf3be.entry.js → p-d8b65cf4.entry.js} +2 -2
- package/dist/isometrik-webchat/p-e48a1217.entry.js +2 -0
- package/dist/isometrik-webchat/p-ff023d39.entry.js +2 -0
- package/dist/isometrik-webchat/p-ff023d39.entry.js.map +1 -0
- package/dist/types/components/ChatUIComponent/Footer/ChatFooter.d.ts +2 -22
- package/dist/types/components/ChatUIComponent/shared/admin-transfer-dialog/admin-transfer-dialog.d.ts +13 -0
- package/dist/types/components/ChatUIComponent/shared/index.d.ts +1 -0
- package/dist/types/components.d.ts +27 -0
- package/dist/types/lib/chat/index.d.ts +2 -2
- package/dist/types/lib/chat/send-media.d.ts +8 -0
- package/dist/types/lib/drawer.d.ts +1 -0
- package/dist/types/lib/group-admin-leave.d.ts +20 -0
- package/dist/types/lib/prompt-exit-group.d.ts +9 -0
- package/dist/types/sdk/headless-api.d.ts +3 -1
- package/package.json +2 -1
- package/dist/cjs/drawer-811d2ce8.js.map +0 -1
- package/dist/cjs/media-limits-eba42629.js +0 -165
- package/dist/cjs/media-limits-eba42629.js.map +0 -1
- package/dist/cjs/profile-avatar_2.cjs.entry.js.map +0 -1
- package/dist/cjs/runtime-controls-201c71ba.js.map +0 -1
- package/dist/cjs/send-media-14908d4b.js.map +0 -1
- package/dist/esm/drawer-74c188f1.js.map +0 -1
- package/dist/esm/media-limits-3fa07c09.js +0 -152
- package/dist/esm/media-limits-3fa07c09.js.map +0 -1
- package/dist/esm/profile-avatar_2.entry.js.map +0 -1
- package/dist/esm/runtime-controls-cf599fe2.js.map +0 -1
- package/dist/esm/send-media-917dcc2f.js.map +0 -1
- package/dist/isometrik-webchat/p-0392c7be.entry.js +0 -2
- package/dist/isometrik-webchat/p-0731d488.js +0 -2
- package/dist/isometrik-webchat/p-0731d488.js.map +0 -1
- package/dist/isometrik-webchat/p-3c70c22c.entry.js +0 -2
- package/dist/isometrik-webchat/p-5d243250.entry.js +0 -2
- package/dist/isometrik-webchat/p-7d4cc4e3.entry.js +0 -2
- package/dist/isometrik-webchat/p-7d4cc4e3.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-7f415f28.js +0 -2
- package/dist/isometrik-webchat/p-b857775d.entry.js +0 -2
- package/dist/isometrik-webchat/p-bdcdf1c5.js +0 -2
- package/dist/isometrik-webchat/p-bdcdf1c5.js.map +0 -1
- package/dist/isometrik-webchat/p-c0c19621.entry.js +0 -2
- package/dist/isometrik-webchat/p-dc2bf17e.entry.js +0 -2
- package/dist/isometrik-webchat/p-dc2bf17e.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-dd62bd69.js +0 -2
- package/dist/isometrik-webchat/p-dd62bd69.js.map +0 -1
- package/dist/isometrik-webchat/p-eb54f75d.js +0 -2
- package/dist/isometrik-webchat/p-eb54f75d.js.map +0 -1
- package/dist/isometrik-webchat/p-ed4699a0.entry.js +0 -2
- package/dist/isometrik-webchat/p-ed4699a0.entry.js.map +0 -1
- /package/dist/isometrik-webchat/{p-a876991d.entry.js.map → p-0ccfbe90.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-1854b156.entry.js.map → p-161fcb35.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-a43ad157.entry.js.map → p-1eecc7c5.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-fdd327f5.entry.js.map → p-2195b0c0.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-3c70c22c.entry.js.map → p-2e9974e1.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-c1e8c38e.entry.js.map → p-3664e0ad.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-b857775d.entry.js.map → p-48ce4dca.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-d720cf14.entry.js.map → p-76341adb.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-2d3e8cd4.entry.js.map → p-7af9a7f3.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-7f415f28.js.map → p-86be30fe.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-5d243250.entry.js.map → p-ad02a8ca.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-c0c19621.entry.js.map → p-c83e2d5d.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-fb705915.entry.js.map → p-cc5b86e6.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-f1fbf3be.entry.js.map → p-d8b65cf4.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-0392c7be.entry.js.map → p-e48a1217.entry.js.map} +0 -0
|
@@ -7,13 +7,13 @@ const chatCreds = require('./chat-creds-2dbc4087.js');
|
|
|
7
7
|
const IsometrikLogo = require('./IsometrikLogo-9e642f65.js');
|
|
8
8
|
const content = require('./content-ebca062a.js');
|
|
9
9
|
const chatAssets = require('./chat-assets-686620e7.js');
|
|
10
|
-
const
|
|
11
|
-
const drawer = require('./drawer-
|
|
10
|
+
const groupcast = require('./groupcast-5e3d49c4.js');
|
|
11
|
+
const drawer = require('./drawer-960b3f5d.js');
|
|
12
12
|
const helpers = require('./helpers-154861e9.js');
|
|
13
13
|
const index_m = require('./index.m-ff115b26.js');
|
|
14
14
|
const groupMembers = require('./group-members-5a82ec8a.js');
|
|
15
|
-
const groupcast = require('./groupcast-c93d4a7d.js');
|
|
16
|
-
const
|
|
15
|
+
const groupcast$1 = require('./groupcast-c93d4a7d.js');
|
|
16
|
+
const sendMedia = require('./send-media-37e09e83.js');
|
|
17
17
|
const client = require('./client-80851676.js');
|
|
18
18
|
const toast = require('./toast-f810e550.js');
|
|
19
19
|
const groupMembers$1 = require('./group-members-1205fc4c.js');
|
|
@@ -38,7 +38,7 @@ function base64ToUint8(base64) {
|
|
|
38
38
|
return out;
|
|
39
39
|
}
|
|
40
40
|
async function filesToOutboxMedia(files) {
|
|
41
|
-
const accepted =
|
|
41
|
+
const accepted = sendMedia.takeMediaFiles(files, 0).accepted;
|
|
42
42
|
let total = 0;
|
|
43
43
|
const out = [];
|
|
44
44
|
for (const file of accepted) {
|
|
@@ -59,7 +59,7 @@ async function filesToOutboxMedia(files) {
|
|
|
59
59
|
function outboxMediaToFiles(mediaFiles) {
|
|
60
60
|
if (!(mediaFiles === null || mediaFiles === void 0 ? void 0 : mediaFiles.length))
|
|
61
61
|
return [];
|
|
62
|
-
return mediaFiles.slice(0,
|
|
62
|
+
return mediaFiles.slice(0, sendMedia.MAX_MEDIA_PER_MESSAGE).map(m => new File([base64ToUint8(m.base64)], m.name, { type: m.mimeType || 'application/octet-stream' }));
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
const ThemeProvider = class {
|
|
@@ -104,7 +104,7 @@ const ThemeProvider = class {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
applyThemeObject(theme) {
|
|
107
|
-
|
|
107
|
+
groupcast.applyThemeObjectToElement(this.hostElement, theme || null);
|
|
108
108
|
}
|
|
109
109
|
/** Mode class on this host only — CSS vars inherit into <web-chat> shadow. */
|
|
110
110
|
updateThemeClass(mode) {
|
|
@@ -141,8 +141,8 @@ const ThemeProvider = class {
|
|
|
141
141
|
return this.mode;
|
|
142
142
|
}
|
|
143
143
|
async setThemeObject(theme) {
|
|
144
|
-
const normalized =
|
|
145
|
-
|
|
144
|
+
const normalized = groupcast.normalizeThemeObject(theme || undefined);
|
|
145
|
+
groupcast.applyThemeObjectToElement(this.hostElement, normalized);
|
|
146
146
|
return normalized;
|
|
147
147
|
}
|
|
148
148
|
render() {
|
|
@@ -1052,8 +1052,8 @@ async function hostEnqueueFailedMedia(host, opts) {
|
|
|
1052
1052
|
localId: opts.localId,
|
|
1053
1053
|
userId: uid,
|
|
1054
1054
|
conversationId: opts.conversationId,
|
|
1055
|
-
body: ((_a = opts.
|
|
1056
|
-
caption: opts.caption,
|
|
1055
|
+
body: ((_a = opts.localMessage) === null || _a === void 0 ? void 0 : _a.body) || sendMedia.attachmentBodyForApi(opts.caption),
|
|
1056
|
+
caption: ((_b = opts.caption) === null || _b === void 0 ? void 0 : _b.trim()) || undefined,
|
|
1057
1057
|
mediaFiles,
|
|
1058
1058
|
metaData: (_c = opts.localMessage) === null || _c === void 0 ? void 0 : _c.metaData,
|
|
1059
1059
|
messageType: (_e = (_d = opts.localMessage) === null || _d === void 0 ? void 0 : _d.messageType) !== null && _e !== void 0 ? _e : 0,
|
|
@@ -1065,7 +1065,7 @@ async function hostEnqueueFailedMedia(host, opts) {
|
|
|
1065
1065
|
await hostPersistMessages(host, opts.conversationId);
|
|
1066
1066
|
}
|
|
1067
1067
|
async function sendOutboxItem(host, item) {
|
|
1068
|
-
var _a;
|
|
1068
|
+
var _a, _b;
|
|
1069
1069
|
const deviceId = host.deviceId || (await helpers.getDeviceID());
|
|
1070
1070
|
if (item.kind === 'media') {
|
|
1071
1071
|
const files = outboxMediaToFiles(item.mediaFiles);
|
|
@@ -1076,7 +1076,8 @@ async function sendOutboxItem(host, item) {
|
|
|
1076
1076
|
conversationId: item.conversationId,
|
|
1077
1077
|
deviceId,
|
|
1078
1078
|
attachments,
|
|
1079
|
-
caption: item.caption ||
|
|
1079
|
+
caption: ((_a = item.caption) === null || _a === void 0 ? void 0 : _a.trim()) ||
|
|
1080
|
+
(sendMedia.isAttachmentBodyPlaceholder(item.body) ? undefined : item.body),
|
|
1080
1081
|
replyMessage: item.parentMessageId
|
|
1081
1082
|
? { messageId: item.parentMessageId }
|
|
1082
1083
|
: null,
|
|
@@ -1090,7 +1091,7 @@ async function sendOutboxItem(host, item) {
|
|
|
1090
1091
|
}
|
|
1091
1092
|
const payload = {
|
|
1092
1093
|
showInConversation: true,
|
|
1093
|
-
messageType: (
|
|
1094
|
+
messageType: (_b = item.messageType) !== null && _b !== void 0 ? _b : 0,
|
|
1094
1095
|
parentMessageId: item.parentMessageId,
|
|
1095
1096
|
searchableTags: item.searchableTags || [],
|
|
1096
1097
|
encrypted: false,
|
|
@@ -1156,7 +1157,7 @@ async function bootstrapWebChat(host, generation) {
|
|
|
1156
1157
|
}
|
|
1157
1158
|
try {
|
|
1158
1159
|
host.updateLoading(25, 'Loading chat engine…');
|
|
1159
|
-
|
|
1160
|
+
groupcast.initializeChatSdk({
|
|
1160
1161
|
baseUrl: host.baseUrl,
|
|
1161
1162
|
licenseKey: host.licenseKey,
|
|
1162
1163
|
appSecret: host.appSecret,
|
|
@@ -1195,7 +1196,7 @@ async function bootstrapWebChat(host, generation) {
|
|
|
1195
1196
|
const isGroupCast = new URLSearchParams(window.location.search).has('groupcast');
|
|
1196
1197
|
if (isGroupCast) {
|
|
1197
1198
|
await host.getGroupCastConversationDetails(host.initialConversationIdFromURL);
|
|
1198
|
-
const messages = await groupcast.getGroupcastMessage(host.initialConversationIdFromURL);
|
|
1199
|
+
const messages = await groupcast$1.getGroupcastMessage(host.initialConversationIdFromURL);
|
|
1199
1200
|
if (messages === null || messages === void 0 ? void 0 : messages.messages) {
|
|
1200
1201
|
host.allMessages = messages.messages.reverse();
|
|
1201
1202
|
}
|
|
@@ -1298,7 +1299,7 @@ function zeroUnreadInList(list, conversationId) {
|
|
|
1298
1299
|
*/
|
|
1299
1300
|
async function hostGetUserDetails(host) {
|
|
1300
1301
|
try {
|
|
1301
|
-
host.userMetaData = await
|
|
1302
|
+
host.userMetaData = await groupcast.fetchUserDetails();
|
|
1302
1303
|
}
|
|
1303
1304
|
catch (error) {
|
|
1304
1305
|
console.error(error, 'getUserDetails fetching error');
|
|
@@ -1309,8 +1310,8 @@ async function hostGetConversations(host, skip = 0, searchTag = null, showLoader
|
|
|
1309
1310
|
if (showLoader)
|
|
1310
1311
|
host.isLoadingConversationList = true;
|
|
1311
1312
|
try {
|
|
1312
|
-
const conversations = await
|
|
1313
|
-
host.allConversationList =
|
|
1313
|
+
const conversations = await groupcast.fetchConversationsPage({ skip, searchTag });
|
|
1314
|
+
host.allConversationList = groupcast.mergeUniqueConversations(host.allConversationList, conversations);
|
|
1314
1315
|
void hostPersistConversations(host);
|
|
1315
1316
|
}
|
|
1316
1317
|
catch (error) {
|
|
@@ -1327,7 +1328,7 @@ async function hostGetGroupCastConversationDetails(host, groupcastId) {
|
|
|
1327
1328
|
if (!groupcastId)
|
|
1328
1329
|
return;
|
|
1329
1330
|
try {
|
|
1330
|
-
host.conversationMetaData = await
|
|
1331
|
+
host.conversationMetaData = await groupcast.fetchGroupcastDetails(groupcastId);
|
|
1331
1332
|
}
|
|
1332
1333
|
catch (error) {
|
|
1333
1334
|
console.error(error, 'GroupCast details fetching error');
|
|
@@ -1336,7 +1337,7 @@ async function hostGetGroupCastConversationDetails(host, groupcastId) {
|
|
|
1336
1337
|
async function hostGetUserConversationDetails(host, conversationId) {
|
|
1337
1338
|
const id = conversationId || host.selectedConversationId;
|
|
1338
1339
|
try {
|
|
1339
|
-
const details = await
|
|
1340
|
+
const details = await groupcast.fetchConversationDetails(id);
|
|
1340
1341
|
if (conversationId)
|
|
1341
1342
|
host.selctConversationMetaData = details;
|
|
1342
1343
|
else
|
|
@@ -1351,7 +1352,7 @@ async function hostGetMessages(host, skip, conversationId) {
|
|
|
1351
1352
|
host.isMessagesLoading = true;
|
|
1352
1353
|
host.isScrollToTop = true;
|
|
1353
1354
|
try {
|
|
1354
|
-
const messages = await
|
|
1355
|
+
const messages = await sendMedia.fetchMessagesPage({
|
|
1355
1356
|
conversationId: conversationId || host.selectedConversationId,
|
|
1356
1357
|
skip,
|
|
1357
1358
|
});
|
|
@@ -1396,7 +1397,7 @@ async function hostGetMessageUnreadCount(host) {
|
|
|
1396
1397
|
async function hostGetMessagesByQuery(host, searchText) {
|
|
1397
1398
|
host.isLoadingMessage = true;
|
|
1398
1399
|
try {
|
|
1399
|
-
host.searchedMessageDetails = await
|
|
1400
|
+
host.searchedMessageDetails = await sendMedia.searchMessages({
|
|
1400
1401
|
conversationId: host.selectedConversationId,
|
|
1401
1402
|
searchTag: searchText,
|
|
1402
1403
|
});
|
|
@@ -1412,7 +1413,7 @@ async function hostGetMessagesByQuery(host, searchText) {
|
|
|
1412
1413
|
async function hostGetAllLinks(host, conversationId) {
|
|
1413
1414
|
host.allLinks = [];
|
|
1414
1415
|
try {
|
|
1415
|
-
host.allLinks = await
|
|
1416
|
+
host.allLinks = await sendMedia.fetchLinkMessages(conversationId);
|
|
1416
1417
|
}
|
|
1417
1418
|
catch (error) {
|
|
1418
1419
|
console.error('Error while fetching all the links for a particular conversation', error);
|
|
@@ -1421,7 +1422,7 @@ async function hostGetAllLinks(host, conversationId) {
|
|
|
1421
1422
|
}
|
|
1422
1423
|
async function hostGetGroupcastMembers(host, groupcastId) {
|
|
1423
1424
|
try {
|
|
1424
|
-
host.groupcastMembers = await
|
|
1425
|
+
host.groupcastMembers = await groupcast.fetchGroupcastMembersPage(groupcastId);
|
|
1425
1426
|
}
|
|
1426
1427
|
catch (error) {
|
|
1427
1428
|
console.error('Error while fetching groupcast members', error);
|
|
@@ -1430,7 +1431,7 @@ async function hostGetGroupcastMembers(host, groupcastId) {
|
|
|
1430
1431
|
}
|
|
1431
1432
|
async function hostGetAllLinksCount(host, conversationId) {
|
|
1432
1433
|
try {
|
|
1433
|
-
host.allLinksCount = await
|
|
1434
|
+
host.allLinksCount = await sendMedia.fetchMediaCount(conversationId);
|
|
1434
1435
|
}
|
|
1435
1436
|
catch (error) {
|
|
1436
1437
|
console.error('Error while fetching media count', error);
|
|
@@ -1442,7 +1443,7 @@ async function hostGetAllAttachments(host, conversationId, from) {
|
|
|
1442
1443
|
host.allAttachments = [];
|
|
1443
1444
|
host.selectConverSationAttachments = [];
|
|
1444
1445
|
try {
|
|
1445
|
-
const filteredMessages = await
|
|
1446
|
+
const filteredMessages = await sendMedia.fetchMediaAttachments(conversationId);
|
|
1446
1447
|
// merge in-chat media so a just-sent image shows before API catch-up
|
|
1447
1448
|
const live = (host.allMessages || []).filter((m) => Array.isArray(m === null || m === void 0 ? void 0 : m.attachments) &&
|
|
1448
1449
|
m.attachments.some((a) => (a === null || a === void 0 ? void 0 : a.mediaUrl) || (a === null || a === void 0 ? void 0 : a.thumbnailUrl)));
|
|
@@ -1475,7 +1476,7 @@ async function hostGetGroupCastContacts(host, skip = 0) {
|
|
|
1475
1476
|
return;
|
|
1476
1477
|
host.isLoadingMoreGroupcast = true;
|
|
1477
1478
|
try {
|
|
1478
|
-
const groupcasts = await
|
|
1479
|
+
const groupcasts = await groupcast.fetchGroupcastContactsPage({ skip, limit: 20 });
|
|
1479
1480
|
if ((groupcasts === null || groupcasts === void 0 ? void 0 : groupcasts.length) > 0) {
|
|
1480
1481
|
host.allGroupCastContacts = skip === 0 ? groupcasts : [...host.allGroupCastContacts, ...groupcasts];
|
|
1481
1482
|
host.groupcastSkip = skip;
|
|
@@ -1521,7 +1522,7 @@ async function hostSendText(host, body, conversationId) {
|
|
|
1521
1522
|
host.isMessageSending = true;
|
|
1522
1523
|
host.isScrollToBottom = true;
|
|
1523
1524
|
const bumpConversationPreview = () => {
|
|
1524
|
-
host.allConversationList =
|
|
1525
|
+
host.allConversationList = groupcast.sortConversationsByLatestMessage(host.allConversationList.map(c => {
|
|
1525
1526
|
var _a;
|
|
1526
1527
|
return c.conversationId === id
|
|
1527
1528
|
? Object.assign(Object.assign({}, c), { lastMessageDetails: Object.assign(Object.assign({}, c.lastMessageDetails), { body: text, updatedAt: Date.now(), senderId: (_a = host.userMetaData) === null || _a === void 0 ? void 0 : _a.userId }) }) : c;
|
|
@@ -1584,7 +1585,7 @@ async function hostSendText(host, body, conversationId) {
|
|
|
1584
1585
|
async function hostSendMedia(host, files, conversationId, caption) {
|
|
1585
1586
|
var _a;
|
|
1586
1587
|
const raw = Array.from(files || []).filter(Boolean);
|
|
1587
|
-
const { accepted: list, rejected } =
|
|
1588
|
+
const { accepted: list, rejected } = sendMedia.takeMediaFiles(raw, 0);
|
|
1588
1589
|
const id = conversationId || host.selectedConversationId;
|
|
1589
1590
|
if (!raw.length || !id) {
|
|
1590
1591
|
host.emitChatError('sendMedia', 'Missing files or conversationId');
|
|
@@ -1592,13 +1593,13 @@ async function hostSendMedia(host, files, conversationId, caption) {
|
|
|
1592
1593
|
}
|
|
1593
1594
|
if (rejected > 0) {
|
|
1594
1595
|
toast.showToast({
|
|
1595
|
-
message:
|
|
1596
|
+
message: sendMedia.mediaLimitToastMessage(rejected, sendMedia.MAX_MEDIA_PER_MESSAGE),
|
|
1596
1597
|
type: 'warning',
|
|
1597
1598
|
position: 'bottom-right',
|
|
1598
1599
|
});
|
|
1599
1600
|
}
|
|
1600
1601
|
if (!list.length) {
|
|
1601
|
-
host.emitChatError('sendMedia', `Max ${
|
|
1602
|
+
host.emitChatError('sendMedia', `Max ${sendMedia.MAX_MEDIA_PER_MESSAGE} files per message`);
|
|
1602
1603
|
return null;
|
|
1603
1604
|
}
|
|
1604
1605
|
const deviceId = host.deviceId || (await helpers.getDeviceID());
|
|
@@ -1606,13 +1607,13 @@ async function hostSendMedia(host, files, conversationId, caption) {
|
|
|
1606
1607
|
const localId = `${Date.now()}${Math.random() * 100}`;
|
|
1607
1608
|
const attachments = sendMedia.prepareMediaAttachments(list);
|
|
1608
1609
|
const localAttachments = sendMedia.buildLocalMediaAttachments(list);
|
|
1609
|
-
const body = (caption
|
|
1610
|
-
const localMessage = Object.assign({ body, messageId: localId, deliveredToAll: 'pending', deliveryStatus: 'sending', senderId: (_a = host.userMetaData) === null || _a === void 0 ? void 0 : _a.userId, messageType: reply ? 2 : 0, sentAt: Date.now(), attachments: localAttachments, customType: list.length === 1 ? sendMedia.customTypeFromMime(list[0].type) :
|
|
1610
|
+
const body = sendMedia.attachmentBodyForApi(caption);
|
|
1611
|
+
const localMessage = Object.assign({ body, messageId: localId, deliveredToAll: 'pending', deliveryStatus: 'sending', senderId: (_a = host.userMetaData) === null || _a === void 0 ? void 0 : _a.userId, messageType: reply ? 2 : 0, sentAt: Date.now(), attachments: localAttachments, customType: list.length === 1 ? sendMedia.customTypeFromMime(list[0].type) : sendMedia.ATTACHMENT_BODY_PLACEHOLDER, metaData: sendMedia.buildReplyMetaData(reply, caption) }, (reply && { parentMessageId: reply.messageId }));
|
|
1611
1612
|
host.allMessages = [...host.allMessages, localMessage];
|
|
1612
1613
|
host.isMessageSending = true;
|
|
1613
1614
|
host.isScrollToBottom = true;
|
|
1614
1615
|
const bumpConversationPreview = () => {
|
|
1615
|
-
host.allConversationList =
|
|
1616
|
+
host.allConversationList = groupcast.sortConversationsByLatestMessage(host.allConversationList.map(c => {
|
|
1616
1617
|
var _a;
|
|
1617
1618
|
return c.conversationId === id
|
|
1618
1619
|
? Object.assign(Object.assign({}, c), { lastMessageDetails: Object.assign(Object.assign({}, c.lastMessageDetails), { body: localMessage.customType || body, updatedAt: Date.now(), senderId: (_a = host.userMetaData) === null || _a === void 0 ? void 0 : _a.userId }) }) : c;
|
|
@@ -1783,7 +1784,8 @@ function createMqttContext(host) {
|
|
|
1783
1784
|
* - while offline → light REST poll for open thread only
|
|
1784
1785
|
* - inbound messages processed on a per-host serial queue
|
|
1785
1786
|
*/
|
|
1786
|
-
|
|
1787
|
+
/** Soft REST merge while MQTT is down OR zombie-connected (looks up, drops msgs). */
|
|
1788
|
+
const SOFT_GAP_FILL_MS = 10000;
|
|
1787
1789
|
function hostAppendInboundMessage(host, parsedMessage) {
|
|
1788
1790
|
host.allMessages = appendUniqueById(host.allMessages, parsedMessage);
|
|
1789
1791
|
void hostPersistMessages(host);
|
|
@@ -1829,17 +1831,15 @@ function clearOfflinePoll(host) {
|
|
|
1829
1831
|
host.mqttRefetchInterval = null;
|
|
1830
1832
|
}
|
|
1831
1833
|
}
|
|
1832
|
-
/**
|
|
1833
|
-
function
|
|
1834
|
+
/** Lightly refresh the open conversation (not a full wipe). */
|
|
1835
|
+
function startSoftGapFillPoll(host) {
|
|
1834
1836
|
if (host.mqttRefetchInterval)
|
|
1835
1837
|
return;
|
|
1836
1838
|
host.mqttRefetchInterval = setInterval(() => {
|
|
1837
|
-
if (
|
|
1838
|
-
clearOfflinePoll(host);
|
|
1839
|
+
if (typeof document !== 'undefined' && document.visibilityState !== 'visible')
|
|
1839
1840
|
return;
|
|
1840
|
-
}
|
|
1841
1841
|
void hostGapFillMessages(host);
|
|
1842
|
-
},
|
|
1842
|
+
}, SOFT_GAP_FILL_MS);
|
|
1843
1843
|
}
|
|
1844
1844
|
/**
|
|
1845
1845
|
* Soft gap-fill: fetch latest page and merge by messageId — no clearing the thread
|
|
@@ -1850,7 +1850,7 @@ async function hostGapFillMessages(host) {
|
|
|
1850
1850
|
if (!conversationId || typeof host.getMessages !== 'function')
|
|
1851
1851
|
return;
|
|
1852
1852
|
try {
|
|
1853
|
-
const page = await
|
|
1853
|
+
const page = await sendMedia.fetchMessagesPage({ conversationId, skip: 0 });
|
|
1854
1854
|
if (!Array.isArray(page) || page.length === 0)
|
|
1855
1855
|
return;
|
|
1856
1856
|
const existing = Array.isArray(host.allMessages) ? host.allMessages : [];
|
|
@@ -1886,7 +1886,8 @@ async function onMqttConnected(host) {
|
|
|
1886
1886
|
host.isMqttConnected = true;
|
|
1887
1887
|
hostSubscribeToMqtt(host);
|
|
1888
1888
|
host.mqttSession.resubscribe();
|
|
1889
|
-
|
|
1889
|
+
// Keep soft REST poll even while "connected" — catches zombie sockets.
|
|
1890
|
+
startSoftGapFillPoll(host);
|
|
1890
1891
|
if (host.selectedConversationId) {
|
|
1891
1892
|
if (!host.isInitialCallDone) {
|
|
1892
1893
|
try {
|
|
@@ -1925,7 +1926,7 @@ function onMqttUnavailable(host, reason, error) {
|
|
|
1925
1926
|
return;
|
|
1926
1927
|
}
|
|
1927
1928
|
}
|
|
1928
|
-
|
|
1929
|
+
startSoftGapFillPoll(host);
|
|
1929
1930
|
}
|
|
1930
1931
|
async function hostSetupMqttClient(host) {
|
|
1931
1932
|
const deviceID = await helpers.getDeviceID();
|
|
@@ -2049,7 +2050,7 @@ function removeMessageById(messages, messageId) {
|
|
|
2049
2050
|
}
|
|
2050
2051
|
/** After deleting a message, fix lastMessageDetails on the conversation row if needed. */
|
|
2051
2052
|
function patchListAfterMessageDelete(list, remainingMessages, payload) {
|
|
2052
|
-
return
|
|
2053
|
+
return groupcast.sortConversationsByLatestMessage((list || []).map(conversation => {
|
|
2053
2054
|
var _a, _b, _c;
|
|
2054
2055
|
if (conversation.conversationId === payload.conversationId && ((_a = conversation === null || conversation === void 0 ? void 0 : conversation.lastMessageDetails) === null || _a === void 0 ? void 0 : _a.messageId) === payload.messageIds) {
|
|
2055
2056
|
const forConv = remainingMessages
|
|
@@ -2090,7 +2091,7 @@ async function hostRemoveMemberClicked(host, event) {
|
|
|
2090
2091
|
const groupcastId = event.detail.conversationId;
|
|
2091
2092
|
try {
|
|
2092
2093
|
if (isGroupcast) {
|
|
2093
|
-
groupcast.removeGroupcastMember(groupcastId, memberToRemove);
|
|
2094
|
+
groupcast$1.removeGroupcastMember(groupcastId, memberToRemove);
|
|
2094
2095
|
}
|
|
2095
2096
|
else {
|
|
2096
2097
|
await groupMembers$1.removeConversationMember(host.selectedConversationId, memberToRemove);
|
|
@@ -2230,7 +2231,7 @@ async function hostSelectedConversationChange(host, newValue) {
|
|
|
2230
2231
|
host.skip = 0;
|
|
2231
2232
|
host.allMessages = [];
|
|
2232
2233
|
await host.getGroupCastConversationDetails(groupcastId);
|
|
2233
|
-
const messages = await groupcast.getGroupcastMessage(groupcastId);
|
|
2234
|
+
const messages = await groupcast$1.getGroupcastMessage(groupcastId);
|
|
2234
2235
|
if (messages === null || messages === void 0 ? void 0 : messages.messages) {
|
|
2235
2236
|
host.allMessages = messages.messages.reverse();
|
|
2236
2237
|
}
|
|
@@ -2249,6 +2250,10 @@ async function hostSelectedConversationChange(host, newValue) {
|
|
|
2249
2250
|
const currentCount = unreadCountStore.getTotalUnreadCount();
|
|
2250
2251
|
unreadCountStore.updateTotalUnreadCount(Math.max(0, currentCount - 1));
|
|
2251
2252
|
}
|
|
2253
|
+
// Always tell the server this thread is open — local unread flags race / miss.
|
|
2254
|
+
void sendMedia.markConversationRead(newValue).catch(err => {
|
|
2255
|
+
console.warn('[webchat] markConversationRead failed', err);
|
|
2256
|
+
});
|
|
2252
2257
|
host.emitSelectionChange();
|
|
2253
2258
|
}
|
|
2254
2259
|
else if (host.conversationDetailsInterval) {
|
|
@@ -2300,7 +2305,7 @@ async function hostDeleteGroupcast(host, e) {
|
|
|
2300
2305
|
var _a;
|
|
2301
2306
|
try {
|
|
2302
2307
|
const groupcastId = (_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.groupcastId;
|
|
2303
|
-
await groupcast.deleteGroupCast(groupcastId);
|
|
2308
|
+
await groupcast$1.deleteGroupCast(groupcastId);
|
|
2304
2309
|
host.allGroupCastContacts = host.allGroupCastContacts.filter((groupcast) => groupcast.groupcastId !== groupcastId);
|
|
2305
2310
|
clearChatUrls();
|
|
2306
2311
|
host.selectedConversationId = null;
|
|
@@ -2475,7 +2480,7 @@ const selectChatPlaceholderSvg = `
|
|
|
2475
2480
|
/** Presentational shell tree for <web-chat> — keeps WebChat.tsx thin. */
|
|
2476
2481
|
/** show / custom-slot / default matrix for any named region. */
|
|
2477
2482
|
function renderRegion(host, slotName, show, renderDefault) {
|
|
2478
|
-
const mode =
|
|
2483
|
+
const mode = groupcast.resolveRegionMode({
|
|
2479
2484
|
show,
|
|
2480
2485
|
hasCustomSlot: index$1.hasNamedSlot(host.el, slotName),
|
|
2481
2486
|
});
|
|
@@ -2770,7 +2775,7 @@ const WebChat = class {
|
|
|
2770
2775
|
drawer.drawerDialogService.closeDialog('confirm-dialog');
|
|
2771
2776
|
};
|
|
2772
2777
|
this.updateConversationList = (updatedList) => {
|
|
2773
|
-
const sortedList =
|
|
2778
|
+
const sortedList = groupcast.sortConversationsByLatestMessage(updatedList);
|
|
2774
2779
|
this.allConversationList = sortedList;
|
|
2775
2780
|
return sortedList;
|
|
2776
2781
|
};
|
|
@@ -3085,7 +3090,7 @@ const WebChat = class {
|
|
|
3085
3090
|
pushConversationUrl(null);
|
|
3086
3091
|
}
|
|
3087
3092
|
sortConversationsByLatestMessage(conversations) {
|
|
3088
|
-
return
|
|
3093
|
+
return groupcast.sortConversationsByLatestMessage(conversations);
|
|
3089
3094
|
}
|
|
3090
3095
|
async handleRemoveMemberClicked(event) {
|
|
3091
3096
|
return hostRemoveMemberClicked(this, event);
|