提交 1a4fb12c 编写于 作者: DCloud_JSON's avatar DCloud_JSON

更新 新增支持通过group_id查云端会话

上级 fcd4afd8
......@@ -198,7 +198,8 @@ export default class Conversation extends CloudData {
// 已有会话id的情况下,不设置更新时间条件
let maxLastMsgCreateTime = false;
let skip = 0;
if (!conversation_id) {
const group_id = param?.group_id
if (!conversation_id && !group_id) {
// 会话列表的总数
const conversationCount = conversationDatas.length
if(conversationCount !== 0){
......@@ -226,7 +227,8 @@ export default class Conversation extends CloudData {
skip,
// 是否要区分是否为置顶会话
distinguishPinned: loadMoreType === 'all',
type:loadMoreType
type:loadMoreType,
group_id
})
if (!conversation_id) {
this.loadMore.lastConversation = {[loadMoreType]: res.data[res.data.length - 1]}
......
......@@ -20,6 +20,8 @@ async function getConversationList({
conversation_id = false,
// 是否要区分是否为置顶
distinguishPinned = false,
// 群id
group_id = false,
sort = {
pinned: -1,
last_msg_create_time: -1,
......@@ -66,7 +68,10 @@ async function getConversationList({
// 如果指定了会话id,则只查询指定的会话
if (conversation_id) {
matchObj.id = conversation_id
} else {
} else if (group_id) {
matchObj.group_id = group_id
}
else {
// 默认不查询置顶会话
if (distinguishPinned) {
matchObj.pinned = dbCmd.neq(true)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册