@bcc-code/vue-bcc-chat-ui 1.2.0 → 1.2.1
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/vue-bcc-chat-ui.js +14 -14
- package/package.json +1 -1
package/dist/vue-bcc-chat-ui.js
CHANGED
|
@@ -70473,26 +70473,26 @@ const qC = {
|
|
|
70473
70473
|
};
|
|
70474
70474
|
let Nu = {};
|
|
70475
70475
|
const pI = oe([]), XFe = async (e) => (Nu[e] || (Nu[e] = await X.CometChat.getGroup(e)), Nu[e]), e$e = async () => {
|
|
70476
|
-
let
|
|
70476
|
+
let t = new X.CometChat.ConversationsRequestBuilder().setLimit(30).setConversationType("group").build(), n = [], o = [];
|
|
70477
70477
|
do
|
|
70478
|
-
|
|
70479
|
-
while (
|
|
70480
|
-
const
|
|
70481
|
-
const
|
|
70478
|
+
o = await t.fetchNext(), n = n.concat(o);
|
|
70479
|
+
while (o.length == 30);
|
|
70480
|
+
const a = n.map((s) => {
|
|
70481
|
+
const i = s.getLastMessage(), d = s.getUnreadMessageCount(), u = i.getType();
|
|
70482
70482
|
return {
|
|
70483
|
-
chatUid:
|
|
70484
|
-
name:
|
|
70483
|
+
chatUid: s.getConversationId().split("_")[1],
|
|
70484
|
+
name: s.getConversationWith().getName(),
|
|
70485
70485
|
lastMessage: {
|
|
70486
|
-
text:
|
|
70487
|
-
type:
|
|
70488
|
-
senderName:
|
|
70489
|
-
sentAt: new Date(
|
|
70486
|
+
text: u === X.CometChat.MESSAGE_TYPE.TEXT ? i.getText() : u === X.CometChat.MESSAGE_TYPE.IMAGE || u === X.CometChat.MESSAGE_TYPE.VIDEO || u === X.CometChat.MESSAGE_TYPE.AUDIO || u === X.CometChat.MESSAGE_TYPE.FILE ? i.getAttachment().getName() : "",
|
|
70487
|
+
type: i ? i.getType() : "",
|
|
70488
|
+
senderName: i ? i.getSender().getName() : "",
|
|
70489
|
+
sentAt: new Date(i ? i.getSentAt() * 1e3 : 0)
|
|
70490
70490
|
},
|
|
70491
|
-
tags:
|
|
70492
|
-
unreadMessageCount:
|
|
70491
|
+
tags: s.getTags(),
|
|
70492
|
+
unreadMessageCount: isNaN(d) ? 0 : d
|
|
70493
70493
|
};
|
|
70494
70494
|
});
|
|
70495
|
-
return pI.value =
|
|
70495
|
+
return pI.value = a, a;
|
|
70496
70496
|
}, t$e = {
|
|
70497
70497
|
getGroup: XFe,
|
|
70498
70498
|
userChats: pI,
|