群邀请消息获取

This commit is contained in:
2022-02-22 14:59:53 +08:00
parent d812ac2862
commit 66092967cb
9 changed files with 163 additions and 126 deletions

View File

@@ -16,8 +16,8 @@ const getMessageList = (conversationType, targetId, timeStamp, count, isForward,
'RC:SightMsg',
'RC:ReferenceMsg',
'RC:CombineMsg',
'RC:GrpNtf',
'RC:InfoNtf'
'RC:GrpNtf',
'RC:InfoNtf'
]
RongIMLib.getHistoryMessagesByTimestamp(
@@ -60,18 +60,16 @@ const getPendingList = (callback, total) => {
// 群组申请列表,邀请列表
const getGroupPendinglist = (targetId, callback) => {
let total = 1000
RongIMLib.getConversationList([RongIMLib.ConversationType.SYSTEM], total, 0, (res) => {
if (res.code === 0) {
const pendings = res.conversations.filter((item) => {
return item.targetId == targetId &&
item.objectName == RongIMLib.ObjectName.ContactNotification &&
item.latestMessage.operation === 'GroupPending'
})
const conversationType = RongIMLib.ConversationType.SYSTEM
const objectNames = ['RC:ContactNtf']
callback(pendings)
RongIMLib.getHistoryMessagesByTimestamp(conversationType, targetId, objectNames, 0, 1000, true,
({
messages
}) => {
callback(messages)
}
})
)
}
/**
@@ -97,6 +95,11 @@ const sentText = (conversationType, targetId, content, user, callback) => {
messageId
}) => {
if (code === 0) {
if (conversationType == 3) {
RongIMLib.sendReadReceiptRequest(messageId, (res) => {
console.log('发送回执请求', res);
})
}
callback(messageId)
} else {
console.log('发送失败', msg);