Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
644c52ae0e | ||
|
|
80048bcd18 | ||
|
|
cc6c1bdc22 | ||
|
|
7233b2e298 | ||
|
|
cd61ebba7f | ||
|
|
3a294dd856 | ||
|
|
45e0c82ea3 | ||
|
|
2de606d13e | ||
|
|
7a68e13398 | ||
|
|
4132338633 | ||
|
|
485bf58f14 | ||
|
|
6ad47216fb | ||
|
|
3c62315cfd | ||
|
|
7247f6b982 | ||
|
|
6a771f8035 | ||
|
|
4726055b6f | ||
|
|
2a9d4a0587 | ||
|
|
cce41e0991 | ||
|
|
599c25b099 | ||
|
|
6c3311cce1 | ||
|
|
9a359ca9a0 | ||
|
|
cc2211c36d | ||
|
|
ccf4d4fec1 | ||
|
|
0b8762a754 | ||
|
|
28a911022c | ||
|
|
996281e49a | ||
|
|
e2b546f400 | ||
|
|
8abc8e4399 | ||
|
|
ed20b4915a | ||
|
|
8b1f4dc320 | ||
|
|
f7416290fb |
95
CHANGELOG.md
95
CHANGELOG.md
@@ -1,9 +1,36 @@
|
|||||||
|
## 2.1.0+1
|
||||||
|
|
||||||
|
1.Add setGroupVerification method </br>
|
||||||
|
|
||||||
|
## 2.1.0
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
2.Add getGroupMemberListByJoinTime method </br>
|
||||||
|
3.Add groupMemberCount field </br>
|
||||||
|
|
||||||
|
## 2.0.9+3
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
2.Add setGlobalRecvMessageOpt method </br>
|
||||||
|
|
||||||
|
## 2.0.9+2
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
2.Add searchOrganization method </br>
|
||||||
|
3.Add searchFriends method </br>
|
||||||
|
4.Add getDepartmentInfo method </br>
|
||||||
|
5.Add setGroupMemberRoleLevel method </br>
|
||||||
|
|
||||||
|
## 2.0.9+1
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
|
||||||
## 2.0.9
|
## 2.0.9
|
||||||
|
|
||||||
1.Fix bug </br>
|
1.Fix bug </br>
|
||||||
2.New organization fuction</br>
|
2.Add organization fuction </br>
|
||||||
3.New uploadImage method </br>
|
3.Add uploadImage method </br>
|
||||||
4.Fix login slow bug</br>
|
4.Fix login slow bug </br>
|
||||||
|
|
||||||
## 2.0.8
|
## 2.0.8
|
||||||
|
|
||||||
@@ -13,38 +40,38 @@
|
|||||||
|
|
||||||
## 2.0.0+6
|
## 2.0.0+6
|
||||||
|
|
||||||
1.Fix bug</br>
|
1.Fix bug </br>
|
||||||
2.Adapter ios emulator</br>
|
2.Adapter ios emulator </br>
|
||||||
3.New modify group nickname</br>
|
3.Add modify group nickname </br>
|
||||||
4.Update at message</br>
|
4.Update at message </br>
|
||||||
5.ConverstaionInfo new add isNotInGroup field</br>
|
5.ConverstaionInfo new add isNotInGroup field</br>
|
||||||
6.New at type</br>
|
6.Add at type </br>
|
||||||
7.New work moments</br>
|
7.Add work moments </br>
|
||||||
8.New global search</br>
|
8.Add global search </br>
|
||||||
9.New getHistoryMessageListReverse method</br>
|
9.Add getHistoryMessageListReverse method </br>
|
||||||
10.New getAtAllTag method</br>
|
10.Add getAtAllTag method </br>
|
||||||
11.New resetConversationGroupAtType method</br>
|
11.Add resetConversationGroupAtType method </br>
|
||||||
12.New searchGroups method</br>
|
12.Add searchGroups method </br>
|
||||||
|
|
||||||
## 2.0.0+5
|
## 2.0.0+5
|
||||||
|
|
||||||
1.New notification parse </br>
|
1.Add notification parse </br>
|
||||||
2.New deleteConversationFromLocalAndSvr method </br>
|
2.Add deleteConversationFromLocalAndSvr method </br>
|
||||||
3.New deleteMessageFromLocalAndSvr method </br>
|
3.Add deleteMessageFromLocalAndSvr method </br>
|
||||||
4.New deleteAllMsgFromLocal method </br>
|
4.Add deleteAllMsgFromLocal method </br>
|
||||||
5.New deleteAllMsgFromLocalAndSvr method </br>
|
5.Add deleteAllMsgFromLocalAndSvr method </br>
|
||||||
6.New clearC2CHistoryMessageFromLocalAndSvr method </br>
|
6.Add clearC2CHistoryMessageFromLocalAndSvr method </br>
|
||||||
7.New clearGroupHistoryMessageFromLocalAndSvr method </br>
|
7.Add clearGroupHistoryMessageFromLocalAndSvr method </br>
|
||||||
8.New markMessageAsReadByConID method </br>
|
8.Add markMessageAsReadByConID method </br>
|
||||||
9.New wakeUp method </br>
|
9.Add wakeUp method </br>
|
||||||
10.New deleteAllConversationFromLocal method </br>
|
10.Add deleteAllConversationFromLocal method </br>
|
||||||
|
|
||||||
## 2.0.0+4
|
## 2.0.0+4
|
||||||
|
|
||||||
1.New dismiss group </br>
|
1.Add dismiss group </br>
|
||||||
2.New search local message </br>
|
2.Add search local message </br>
|
||||||
3.New private chat </br>
|
3.Add private chat </br>
|
||||||
4.New group mute
|
4.Add group mute
|
||||||
|
|
||||||
## 2.0.0+3
|
## 2.0.0+3
|
||||||
|
|
||||||
@@ -53,8 +80,8 @@
|
|||||||
## 2.0.0+2
|
## 2.0.0+2
|
||||||
|
|
||||||
1.Fix some one crash </br>
|
1.Fix some one crash </br>
|
||||||
2.New add signaling function </br>
|
2.Add signaling function </br>
|
||||||
3.New add group have read receipt
|
3.Add group have read receipt
|
||||||
|
|
||||||
## 2.0.0+1
|
## 2.0.0+1
|
||||||
|
|
||||||
@@ -81,13 +108,13 @@
|
|||||||
## 1.0.8
|
## 1.0.8
|
||||||
|
|
||||||
1.Upgrade sdk to 1.4.4. </br>
|
1.Upgrade sdk to 1.4.4. </br>
|
||||||
2.New and changed conversation return changed data and no longer return all data. </br>
|
2.Add changed conversation return changed data and no longer return all data. </br>
|
||||||
3.New conversation paging method.
|
3.Add conversation paging method.
|
||||||
|
|
||||||
## 1.0.7
|
## 1.0.7
|
||||||
|
|
||||||
Upgrade sdk to 1.3.4 </br>
|
Upgrade sdk to 1.3.4 </br>
|
||||||
New add method setConversationRecvMessageOpt and getConversationRecvMessageOpt
|
Add method setConversationRecvMessageOpt and getConversationRecvMessageOpt
|
||||||
|
|
||||||
## 1.0.6
|
## 1.0.6
|
||||||
|
|
||||||
@@ -125,7 +152,7 @@ Fix bug
|
|||||||
## 0.0.9+5
|
## 0.0.9+5
|
||||||
|
|
||||||
1. Android upgrade sdk to 0.0.17 </br>
|
1. Android upgrade sdk to 0.0.17 </br>
|
||||||
2. New add createFileMessageFromFullPath method
|
2. Add createFileMessageFromFullPath method
|
||||||
|
|
||||||
## 0.0.9+4
|
## 0.0.9+4
|
||||||
Fix ios friendship params error
|
Fix ios friendship params error
|
||||||
|
|||||||
599
README.zh-cn.md
599
README.zh-cn.md
@@ -1,6 +1,208 @@
|
|||||||
## SDK使用步骤
|
## SDK使用步骤
|
||||||
|
|
||||||
##### 1,初始化
|
#### 1,[初始化](#initsdk%E5%88%9D%E5%A7%8B%E5%8C%96sdk)
|
||||||
|
|
||||||
|
#### 2,[设置监听器](#%E7%9B%91%E5%90%AC%E5%99%A8%E8%AE%BE%E7%BD%AE)
|
||||||
|
|
||||||
|
#### 3,[登录](#login%E7%99%BB%E5%BD%95)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 类方法说明
|
||||||
|
|
||||||
|
#### IMManager(初始化管理)
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| ---------------- | --------------------------------------------- |
|
||||||
|
| initSDK | 初始化SDK |
|
||||||
|
| unInitSDK | 反初始化SDK |
|
||||||
|
| login | 登录 |
|
||||||
|
| logout | 登出 |
|
||||||
|
| getLoginStatus | 获取登录状态 |
|
||||||
|
| getLoginUserID | 登录者用户ID |
|
||||||
|
| getLoginUserInfo | 登录者用户资料 |
|
||||||
|
| wakeUp | 唤醒socket通信(当app从后台回到前台恢复通信) |
|
||||||
|
| uploadImage | 上传图片到服务器 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### UserManager(用户信息管理)
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| --------------- | ------------------------ |
|
||||||
|
| setUserListener | 当前登录用户信息变更监听 |
|
||||||
|
| getUsersInfo | 根据userID获取用户资料 |
|
||||||
|
| getSelfUserInfo | 获取当前登录用户资料 |
|
||||||
|
| setSelfInfo | 修改当前登录用户资料 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### ConversationManager(会话管理)
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| --------------------------------- | -------------------------------------- |
|
||||||
|
| setConversationListener | 会话监听 |
|
||||||
|
| getAllConversationList | 获取所有会话 |
|
||||||
|
| getConversationListSplit | 分页获取会话 |
|
||||||
|
| getOneConversation | 查询会话,如果会话不存在会自动生成一个 |
|
||||||
|
| getMultipleConversation | 根据会话id获取多个会话 |
|
||||||
|
| deleteConversation | 通过会话id删除指定会话 |
|
||||||
|
| setConversationDraft | 设置会话草稿 |
|
||||||
|
| pinConversation | 置顶会话 |
|
||||||
|
| markGroupMessageHasRead | 标记群聊会话已读 |
|
||||||
|
| getTotalUnreadMsgCount | 获取未读消息总数 |
|
||||||
|
| getConversationIDBySessionType | 查询会话id |
|
||||||
|
| setConversationRecvMessageOpt | 消息免打扰设置 |
|
||||||
|
| getConversationRecvMessageOpt | 查询免打扰状态 |
|
||||||
|
| setOneConversationPrivateChat | 阅后即焚 |
|
||||||
|
| deleteConversationFromLocalAndSvr | 删除本地以及服务器的会话 |
|
||||||
|
| deleteAllConversationFromLocal | 删除所有本地会话 |
|
||||||
|
| resetConversationGroupAtType | 重置强提醒标识 |
|
||||||
|
| getAtAllTag | 查询@所有人标识 |
|
||||||
|
| setGlobalRecvMessageOpt | 全局免打扰设置 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### FriendshipManager(好友关系管理)
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| ---------------------------- | -------------------------------------------------- |
|
||||||
|
| setFriendshipListener | 好友关系监听 |
|
||||||
|
| getFriendsInfo | 查询好友信息 |
|
||||||
|
| addFriend | 发送一个好友请求,需要对方调用同意申请才能成为好友 |
|
||||||
|
| getRecvFriendApplicationList | 获取别人加我为好友的申请 |
|
||||||
|
| getSendFriendApplicationList | 获取我发出的好友申请 |
|
||||||
|
| getFriendList | 获取好友列表,返回的列表包含了已拉入黑名单的好友 |
|
||||||
|
| setFriendRemark | 设置好友备注 |
|
||||||
|
| addBlacklist | 加入黑名单 |
|
||||||
|
| getBlacklist | 获取黑名单列表 |
|
||||||
|
| removeBlacklist | 从黑名单移除 |
|
||||||
|
| checkFriend | 检查友好关系 |
|
||||||
|
| deleteFriend | 删除好友 |
|
||||||
|
| acceptFriendApplication | 接受好友请求 |
|
||||||
|
| refuseFriendApplication | 拒绝好友请求 |
|
||||||
|
| searchFriends | 查好友 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### GroupManager(组/群关系管理)
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| ---------------------------- | ---------------------------------------- |
|
||||||
|
| setGroupListener | 组关系监听 |
|
||||||
|
| inviteUserToGroup | 邀请进组,直接进组无需同意 |
|
||||||
|
| kickGroupMember | 移除组成员 |
|
||||||
|
| getGroupMembersInfo | 查询组成员资料 |
|
||||||
|
| getGroupMemberList | 分页获取组成员列表 |
|
||||||
|
| getJoinedGroupList | 查询已加入的组列表 |
|
||||||
|
| isJoinedGroup | 检查是否已加入组 |
|
||||||
|
| createGroup | 创建一个组 |
|
||||||
|
| setGroupInfo | 编辑组资料 |
|
||||||
|
| getGroupsInfo | 查询组信息 |
|
||||||
|
| joinGroup | 申请加入组,需要通过管理员/群组同意。 |
|
||||||
|
| quitGroup | 退出组 |
|
||||||
|
| transferGroupOwner | 转移组拥有者权限 |
|
||||||
|
| getRecvGroupApplicationList | 作为群主或者管理员,收到的群成员入群申请 |
|
||||||
|
| getSendGroupApplicationList | 获取自己发出的入群申请记录 |
|
||||||
|
| acceptGroupApplication | 管理员或者群主同意某人进入某群 |
|
||||||
|
| refuseGroupApplication | 管理员或者群主拒绝某人进入某群 |
|
||||||
|
| dismissGroup | 解散群 |
|
||||||
|
| changeGroupMute | 开启群禁言,所有群成员禁止发言 |
|
||||||
|
| changeGroupMemberMute | 禁言群成员 |
|
||||||
|
| setGroupMemberNickname | 设置群成员昵称 |
|
||||||
|
| searchGroups | 查询群 |
|
||||||
|
| setGroupMemberRoleLevel | 设置群成员权限 |
|
||||||
|
| getGroupMemberListByJoinTime | 根据加入时间分页获取组成员列表 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### MessageManager(消息管理)
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| --------------------------------------- | ------------------------------------------------------------ |
|
||||||
|
| setAdvancedMsgListener | 消息监听 |
|
||||||
|
| setMsgSendProgressListener | 消息发送进度监听 |
|
||||||
|
| sendMessage | 发送消息 |
|
||||||
|
| getHistoryMessageList | 获取聊天记录(以startMsg为节点,以前的聊天记录) |
|
||||||
|
| revokeMessage | 撤回消息 |
|
||||||
|
| deleteMessageFromLocalStorage | 删除本地消息 |
|
||||||
|
| insertSingleMessageToLocalStorage | 插入单聊消息到本地 |
|
||||||
|
| insertGroupMessageToLocalStorage | 插入群聊消息到本地 |
|
||||||
|
| markC2CMessageAsRead | 标记c2c单条消息已读 |
|
||||||
|
| markGroupMessageAsRead | 标记群聊消息已读 |
|
||||||
|
| typingStatusUpdate | 正在输入提示 |
|
||||||
|
| createTextMessage | 创建文本消息 |
|
||||||
|
| createTextAtMessage | 创建@消息 |
|
||||||
|
| createImageMessage | 创建图片消息 |
|
||||||
|
| createImageMessageFromFullPath | 创建图片消息 |
|
||||||
|
| createSoundMessage | 创建语音消息 |
|
||||||
|
| createSoundMessageFromFullPath | 创建语音消息 |
|
||||||
|
| createVideoMessage | 创建视频消息 |
|
||||||
|
| createVideoMessageFromFullPath | 创建视频消息 |
|
||||||
|
| createFileMessage | 创建文件消息 |
|
||||||
|
| createFileMessageFromFullPath | 创建文件消息 |
|
||||||
|
| createMergerMessage | 创建合并消息 |
|
||||||
|
| createForwardMessage | 创建转发消息 |
|
||||||
|
| createLocationMessage | 创建位置消息 |
|
||||||
|
| createCustomMessage | 创建自定义消息 |
|
||||||
|
| createQuoteMessage | 创建引用消息 |
|
||||||
|
| createCardMessage | 创建卡片消息 |
|
||||||
|
| createFaceMessage | 创建自定义表情消息 |
|
||||||
|
| clearC2CHistoryMessage | 清空单聊消息记录 |
|
||||||
|
| clearGroupHistoryMessage | 清空组消息记录 |
|
||||||
|
| searchLocalMessages | 搜索消息 |
|
||||||
|
| deleteMessageFromLocalAndSvr | 删除本地跟服务器的指定的消息 |
|
||||||
|
| deleteAllMsgFromLocal | 删除本地所有聊天记录 |
|
||||||
|
| deleteAllMsgFromLocalAndSvr | 删除本地跟服务器所有聊天记录 |
|
||||||
|
| markMessageAsReadByConID | 标记消息已读 |
|
||||||
|
| clearC2CHistoryMessageFromLocalAndSvr | 删除本地跟服务器的单聊聊天记录 |
|
||||||
|
| clearGroupHistoryMessageFromLocalAndSvr | 删除本地跟服务器的群聊天记录 |
|
||||||
|
| getHistoryMessageListReverse | 获取聊天记录(以startMsg为节点,新收到的聊天记录),用在全局搜索定位某一条消息,然后此条消息后新增的消息 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### OrganizationManager(组织架构管理)
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| ----------------------- | ---------------------------------------------- |
|
||||||
|
| setOrganizationListener | 组织架构发生变化回调 |
|
||||||
|
| getSubDept | 获取子部门列表,返回当前部门下的一级子部门 |
|
||||||
|
| getDeptMember | 获取部门下的成员列表,返回当前部门下的一级成员 |
|
||||||
|
| getUserInDept | 获取成员所在的部门 |
|
||||||
|
| getDeptMemberAndSubDept | 获取部门下的子部门跟员工 |
|
||||||
|
| getDeptInfo | 查询部门信息 |
|
||||||
|
| searchOrganization | 搜索组织人员 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### SignalingManager(信令管理)
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| ---------------------- | ------------------------ |
|
||||||
|
| setSignalingListener | 信令监听 |
|
||||||
|
| signalingInvite | 邀请个人加入音视频 |
|
||||||
|
| signalingInviteInGroup | 邀请群里某些人加入音视频 |
|
||||||
|
| signalingAccept | 同意某人音视频邀请 |
|
||||||
|
| signalingReject | 拒绝某人音视频邀请 |
|
||||||
|
| signalingCancel | 邀请者取消音视频通话 |
|
||||||
|
| signalingHungUp | 挂断 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### WorkMomentsManager(朋友圈管理)
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| ---------------------------- | ---------------------- |
|
||||||
|
| setWorkMomentsListener | 朋友圈信息发送变化通知 |
|
||||||
|
| getWorkMomentsUnReadCount | 获取朋友圈未读消息总数 |
|
||||||
|
| getWorkMomentsNotification | 获取通知列表 |
|
||||||
|
| clearWorkMomentsNotification | 清除通知列表 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 方法名、参数、返回值说明
|
||||||
|
|
||||||
|
- ##### initSDK(初始化SDK)
|
||||||
|
|
||||||
```
|
```
|
||||||
OpenIM.iMManager.initSDK(
|
OpenIM.iMManager.initSDK(
|
||||||
@@ -34,126 +236,12 @@ OpenIM.iMManager.initSDK(
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
##### 2,设置监听器
|
|
||||||
|
|
||||||
|
- ##### login(登录)
|
||||||
|
|
||||||
```
|
```
|
||||||
OpenIM.iMManager
|
OpenIM.iMManager.login(
|
||||||
..userManager.setUserListener(OnUserListener(
|
|
||||||
onSelfInfoUpdated: (userInfo) {
|
|
||||||
// 当前登录用户资料变更回调
|
|
||||||
},
|
|
||||||
))
|
|
||||||
..messageManager.setAdvancedMsgListener(OnAdvancedMsgListener(
|
|
||||||
onRecvNewMessage: (message) {
|
|
||||||
// 收到新消息,界面添加新消息
|
|
||||||
},
|
|
||||||
onRecvMessageRevoked: (messageID) {
|
|
||||||
// 消息成功撤回,从界面移除消息
|
|
||||||
},
|
|
||||||
onRecvC2CReadReceipt: (list) {
|
|
||||||
// 消息被阅读回执,将消息标记为已读
|
|
||||||
},
|
|
||||||
))
|
|
||||||
..messageManager.setMsgSendProgressListener(OnMsgSendProgressListener(
|
|
||||||
onProgress: (messageID, progress) {
|
|
||||||
// 消息发送进度回调
|
|
||||||
},
|
|
||||||
))
|
|
||||||
..friendshipManager.setFriendshipListener(OnFriendshipListener(
|
|
||||||
onFriendApplicationRejected: (applicationInfo) {
|
|
||||||
// 发出或收到的好友申请被拒绝
|
|
||||||
},
|
|
||||||
onFriendApplicationDeleted: (applicationInfo) {
|
|
||||||
// 发出或收到的好友申请被删除
|
|
||||||
},
|
|
||||||
onFriendApplicationAdded: (applicationInfo) {
|
|
||||||
// 发出或收到的好友申请被添加
|
|
||||||
},
|
|
||||||
onFriendApplicationAccepted: (applicationInfo) {
|
|
||||||
// 发出或收到的好友申请已同意
|
|
||||||
},
|
|
||||||
onFriendAdded: (frinedInfo) {
|
|
||||||
// 好友被添加
|
|
||||||
},
|
|
||||||
onFriendDeleted: (frinedInfo) {
|
|
||||||
// 好友被删除
|
|
||||||
},
|
|
||||||
onFriendInfoChanged: (frinedInfo) {
|
|
||||||
// 朋友的资料发生变化
|
|
||||||
},
|
|
||||||
onBlacklistDeleted: (blackInfo) {
|
|
||||||
// 从黑名单删除
|
|
||||||
},
|
|
||||||
onBlacklistAdded: (blackInfo) {
|
|
||||||
// 拉入黑名单
|
|
||||||
},
|
|
||||||
))
|
|
||||||
..conversationManager.setConversationListener(OnConversationListener(
|
|
||||||
onNewConversation: (list) {
|
|
||||||
// 新增会话
|
|
||||||
},
|
|
||||||
onConversationChanged: (list) {
|
|
||||||
// 已添加的会话发送改变
|
|
||||||
},
|
|
||||||
onTotalUnreadMessageCountChanged: (count) {
|
|
||||||
// 未读消息数发送变化
|
|
||||||
},
|
|
||||||
))
|
|
||||||
..groupManager.setGroupListener(OnGroupListener(
|
|
||||||
onGroupMemberInfoChanged: (memberInfo) {
|
|
||||||
// 组成员信息发生变化
|
|
||||||
},
|
|
||||||
onGroupMemberDeleted: (memberInfo) {
|
|
||||||
// 组成员退出
|
|
||||||
},
|
|
||||||
onGroupMemberAdded: (memberInfo) {
|
|
||||||
// 组成员进入
|
|
||||||
},
|
|
||||||
onGroupApplicationRejected: (applicationInfo) {
|
|
||||||
// 发出或收到的组申请被拒绝
|
|
||||||
},
|
|
||||||
onGroupApplicationDeleted: (applicationInfo) {
|
|
||||||
// 发出或收到的组申请被删除
|
|
||||||
},
|
|
||||||
onGroupApplicationAdded: (applicationInfo) {
|
|
||||||
// 发出或收到的组申请有新增
|
|
||||||
},
|
|
||||||
onGroupApplicationAccepted: (applicationInfo) {
|
|
||||||
// 发出或收到的组申请被接受
|
|
||||||
},
|
|
||||||
onJoinedGroupDeleted: (groupInfo) {
|
|
||||||
// 退出群:退出者收到;踢出群:被踢者收到
|
|
||||||
},
|
|
||||||
onJoinedGroupAdded: (groupInfo) {
|
|
||||||
// 创建群: 初始成员收到;邀请进群:被邀请者收到
|
|
||||||
},
|
|
||||||
onGroupInfoChanged: (groupInfo) {
|
|
||||||
// 组资料变更
|
|
||||||
},
|
|
||||||
))
|
|
||||||
..signalingManager.setSignalingListener(OnSignalingListener(
|
|
||||||
onReceiveNewInvitation: (info) {
|
|
||||||
// 被邀请者收到:音视频通话邀请
|
|
||||||
},
|
|
||||||
onInviteeRejected: (info) {
|
|
||||||
// 邀请者收到:被邀请者拒绝音视频通话
|
|
||||||
},
|
|
||||||
onInviteeAccepted: (info) {
|
|
||||||
// 邀请者收到:被邀请者同意音视频通话
|
|
||||||
},
|
|
||||||
onInvitationTimeout: (info) {
|
|
||||||
// 邀请者收到:被邀请者超时未接通
|
|
||||||
},
|
|
||||||
onInvitationCancelled: (info) {
|
|
||||||
// 被邀请者收到:邀请者取消音视频通话
|
|
||||||
},
|
|
||||||
));
|
|
||||||
```
|
|
||||||
|
|
||||||
##### 3,登录
|
|
||||||
|
|
||||||
```
|
|
||||||
OpenIM.iMManager.login(
|
|
||||||
uid: "", // uid来自于自身业务服务器
|
uid: "", // uid来自于自身业务服务器
|
||||||
token: "", // token需要业务服务器根据secret向OpenIM服务端交换获取
|
token: "", // token需要业务服务器根据secret向OpenIM服务端交换获取
|
||||||
).then((userInfo) {
|
).then((userInfo) {
|
||||||
@@ -163,10 +251,6 @@ OpenIM.iMManager
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 方法名、参数、返回值说明
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- ##### logout( 登出)
|
- ##### logout( 登出)
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -441,7 +525,7 @@ OpenIM.iMManager.conversationManager.deleteAllConversationFromLocal(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
- ##### resetConversationGroupAtType
|
- ##### resetConversationGroupAtType(重置会话强提示标识位)
|
||||||
|
|
||||||
```
|
```
|
||||||
OpenIM.iMManager.conversationManager.resetConversationGroupAtType(
|
OpenIM.iMManager.conversationManager.resetConversationGroupAtType(
|
||||||
@@ -455,7 +539,7 @@ OpenIM.iMManager.conversationManager.resetConversationGroupAtType(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
- ##### getAtAllTag
|
- ##### getAtAllTag(@所有标识)
|
||||||
|
|
||||||
```
|
```
|
||||||
OpenIM.iMManager.conversationManager.getAtAllTag();
|
OpenIM.iMManager.conversationManager.getAtAllTag();
|
||||||
@@ -463,6 +547,16 @@ OpenIM.iMManager.conversationManager.getAtAllTag();
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### setGlobalRecvMessageOpt(设置全局免打扰状态)
|
||||||
|
|
||||||
|
```
|
||||||
|
OpenIM.iMManager.conversationManager.setGlobalRecvMessageOpt(
|
||||||
|
status: status,// 0:正常;1:不接受消息;2:接受在线消息不接受离线消息;
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- ##### simpleSort(自定义会话排序规则)
|
- ##### simpleSort(自定义会话排序规则)
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -659,6 +753,18 @@ OpenIM.iMManager.friendshipManager.acceptFriendApplication(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### searchFriends(搜索好友)
|
||||||
|
|
||||||
|
```
|
||||||
|
var list = await OpenIM.iMManager.friendshipManager.searchFriends(
|
||||||
|
keywordList: [searchCtrl.text.trim()],//关键词
|
||||||
|
isSearchNickname: true,//按昵称查找
|
||||||
|
isSearchRemark: true,//按备注查找
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- ##### inviteUserToGroup(邀请进组)
|
- ##### inviteUserToGroup(邀请进组)
|
||||||
|
|
||||||
直接进组无需同意。
|
直接进组无需同意。
|
||||||
@@ -780,6 +886,7 @@ OpenIM.iMManager.groupManager.setGroupInfo(
|
|||||||
notification: '', // 群公告
|
notification: '', // 群公告
|
||||||
introduction: '', // 群简介
|
introduction: '', // 群简介
|
||||||
ex: '', // 扩展信息
|
ex: '', // 扩展信息
|
||||||
|
needVerification: '',// 进群验证设置
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -960,6 +1067,33 @@ List<GroupInfo> list = await OpenIM.iMManager.groupManager.searchGroups(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### setGroupMemberRoleLevel(设置群成员角色)
|
||||||
|
|
||||||
|
```
|
||||||
|
OpenIM.iMManager.groupManager.setGroupMemberRoleLevel(
|
||||||
|
groupID: groupID,
|
||||||
|
userID: userID,
|
||||||
|
roleLevel: GroupRoleLevel.member,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### getGroupMemberListByJoinTime(根据加入时间分页获取组成员列表)
|
||||||
|
|
||||||
|
```
|
||||||
|
// 如:获取消息发送前入群的成员,用于查看消息未读列表
|
||||||
|
var list = await OpenIM.iMManager.groupManager.getGroupMemberListByJoinTime(
|
||||||
|
groupID: message.groupID!,
|
||||||
|
joinTimeEnd: message.sendTime! ~/ 1000,
|
||||||
|
offset: 0,
|
||||||
|
count: 40,
|
||||||
|
excludeUserIDList: [...hasReadIDList, OpenIM.iMManager.uid],// 排除的人员
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- ##### sendMessage(发送消息)
|
- ##### sendMessage(发送消息)
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -1354,6 +1488,7 @@ OpenIM.iMManager.messageManager.clearGroupHistoryMessageFromLocalAndSvr(
|
|||||||
- ##### getHistoryMessageListReverse(获取新的聊天记录)
|
- ##### getHistoryMessageListReverse(获取新的聊天记录)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
// 获取聊天记录(以startMsg为节点,新收到的聊天记录),用在全局搜索定位某一条消息,然后此条消息后新增的消息
|
||||||
OpenIM.iMManager.messageManager.getHistoryMessageListReverse(
|
OpenIM.iMManager.messageManager.getHistoryMessageListReverse(
|
||||||
userID: '', // 单聊对象的userID
|
userID: '', // 单聊对象的userID
|
||||||
groupID: '', // 群聊的组id
|
groupID: '', // 群聊的组id
|
||||||
@@ -1424,3 +1559,217 @@ OpenIM.iMManager.signalingManager.signalingHungUp(
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### getSubDept(获取子部门列表,返回当前部门下的一级子部门)
|
||||||
|
|
||||||
|
```
|
||||||
|
var list = await OpenIM.iMManager.organizationManager.getSubDept(
|
||||||
|
departmentID: '', // 部门id
|
||||||
|
offset: 0, // 开始下标
|
||||||
|
count: 40, // 每页大小
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### getDeptMember(获取部门下的成员列表,返回当前部门下的一级成员)
|
||||||
|
|
||||||
|
```
|
||||||
|
var list = await OpenIM.iMManager.organizationManager.getDeptMember(
|
||||||
|
departmentID: '', // 部门id
|
||||||
|
offset: 0, // 开始下标
|
||||||
|
count: 40, // 每页大小
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### getUserInDept(获取成员所在的部门)
|
||||||
|
|
||||||
|
```
|
||||||
|
var list = await OpenIM.iMManager.organizationManager.getUserInDept(
|
||||||
|
userID: '', // 成员id
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### getDeptMemberAndSubDept(获取部门下的子部门跟员工)
|
||||||
|
|
||||||
|
```
|
||||||
|
var detail = await OpenIM.iMManager.organizationManager.getDeptMemberAndSubDept(
|
||||||
|
departmentID: '', // 部门id
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### getDeptInfo(查询部门信息)
|
||||||
|
|
||||||
|
```
|
||||||
|
var info = await OpenIM.iMManager.organizationManager.getDeptInfo(
|
||||||
|
departmentID: '', // 部门id
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### searchOrganization(搜索组织人员)
|
||||||
|
|
||||||
|
```
|
||||||
|
var result = await OpenIM.iMManager.organizationManager.searchOrganization(
|
||||||
|
keyWord: searchCtrl.text.trim(),
|
||||||
|
isSearchUserName: true,
|
||||||
|
isSearchEnglishName: true,
|
||||||
|
isSearchPosition: true,
|
||||||
|
offset: offset,
|
||||||
|
count: count,
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### getWorkMomentsUnReadCount(获取朋友圈未读消息总数)
|
||||||
|
|
||||||
|
```
|
||||||
|
var count = await OpenIM.iMManager.workMomentsManager.getWorkMomentsUnReadCount();
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### getWorkMomentsNotification(获取朋友圈通知列表)
|
||||||
|
|
||||||
|
```
|
||||||
|
var list = await OpenIM.iMManager.workMomentsManager.getWorkMomentsNotification(
|
||||||
|
offset:0,//开始下标
|
||||||
|
count:40,//每页大小
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### clearWorkMomentsNotification(清除朋友圈通知列表)
|
||||||
|
|
||||||
|
```
|
||||||
|
OpenIM.iMManager.workMomentsManager.clearWorkMomentsNotification();
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- ##### 监听器设置
|
||||||
|
|
||||||
|
```
|
||||||
|
OpenIM.iMManager
|
||||||
|
..userManager.setUserListener(OnUserListener(
|
||||||
|
onSelfInfoUpdated: (userInfo) {
|
||||||
|
// 当前登录用户资料变更回调
|
||||||
|
},
|
||||||
|
))
|
||||||
|
..messageManager.setAdvancedMsgListener(OnAdvancedMsgListener(
|
||||||
|
onRecvNewMessage: (message) {
|
||||||
|
// 收到新消息,界面添加新消息
|
||||||
|
},
|
||||||
|
onRecvMessageRevoked: (messageID) {
|
||||||
|
// 消息成功撤回,从界面移除消息
|
||||||
|
},
|
||||||
|
onRecvC2CReadReceipt: (list) {
|
||||||
|
// 消息被阅读回执,将消息标记为已读
|
||||||
|
},
|
||||||
|
))
|
||||||
|
..messageManager.setMsgSendProgressListener(OnMsgSendProgressListener(
|
||||||
|
onProgress: (messageID, progress) {
|
||||||
|
// 消息发送进度回调
|
||||||
|
},
|
||||||
|
))
|
||||||
|
..friendshipManager.setFriendshipListener(OnFriendshipListener(
|
||||||
|
onFriendApplicationRejected: (applicationInfo) {
|
||||||
|
// 发出或收到的好友申请被拒绝
|
||||||
|
},
|
||||||
|
onFriendApplicationDeleted: (applicationInfo) {
|
||||||
|
// 发出或收到的好友申请被删除
|
||||||
|
},
|
||||||
|
onFriendApplicationAdded: (applicationInfo) {
|
||||||
|
// 发出或收到的好友申请被添加
|
||||||
|
},
|
||||||
|
onFriendApplicationAccepted: (applicationInfo) {
|
||||||
|
// 发出或收到的好友申请已同意
|
||||||
|
},
|
||||||
|
onFriendAdded: (frinedInfo) {
|
||||||
|
// 好友被添加
|
||||||
|
},
|
||||||
|
onFriendDeleted: (frinedInfo) {
|
||||||
|
// 好友被删除
|
||||||
|
},
|
||||||
|
onFriendInfoChanged: (frinedInfo) {
|
||||||
|
// 朋友的资料发生变化
|
||||||
|
},
|
||||||
|
onBlacklistDeleted: (blackInfo) {
|
||||||
|
// 从黑名单删除
|
||||||
|
},
|
||||||
|
onBlacklistAdded: (blackInfo) {
|
||||||
|
// 拉入黑名单
|
||||||
|
},
|
||||||
|
))
|
||||||
|
..conversationManager.setConversationListener(OnConversationListener(
|
||||||
|
onNewConversation: (list) {
|
||||||
|
// 新增会话
|
||||||
|
},
|
||||||
|
onConversationChanged: (list) {
|
||||||
|
// 已添加的会话发送改变
|
||||||
|
},
|
||||||
|
onTotalUnreadMessageCountChanged: (count) {
|
||||||
|
// 未读消息数发送变化
|
||||||
|
},
|
||||||
|
))
|
||||||
|
..groupManager.setGroupListener(OnGroupListener(
|
||||||
|
onGroupMemberInfoChanged: (memberInfo) {
|
||||||
|
// 组成员信息发生变化
|
||||||
|
},
|
||||||
|
onGroupMemberDeleted: (memberInfo) {
|
||||||
|
// 组成员退出
|
||||||
|
},
|
||||||
|
onGroupMemberAdded: (memberInfo) {
|
||||||
|
// 组成员进入
|
||||||
|
},
|
||||||
|
onGroupApplicationRejected: (applicationInfo) {
|
||||||
|
// 发出或收到的组申请被拒绝
|
||||||
|
},
|
||||||
|
onGroupApplicationDeleted: (applicationInfo) {
|
||||||
|
// 发出或收到的组申请被删除
|
||||||
|
},
|
||||||
|
onGroupApplicationAdded: (applicationInfo) {
|
||||||
|
// 发出或收到的组申请有新增
|
||||||
|
},
|
||||||
|
onGroupApplicationAccepted: (applicationInfo) {
|
||||||
|
// 发出或收到的组申请被接受
|
||||||
|
},
|
||||||
|
onJoinedGroupDeleted: (groupInfo) {
|
||||||
|
// 退出群:退出者收到;踢出群:被踢者收到
|
||||||
|
},
|
||||||
|
onJoinedGroupAdded: (groupInfo) {
|
||||||
|
// 创建群: 初始成员收到;邀请进群:被邀请者收到
|
||||||
|
},
|
||||||
|
onGroupInfoChanged: (groupInfo) {
|
||||||
|
// 组资料变更
|
||||||
|
},
|
||||||
|
))
|
||||||
|
..signalingManager.setSignalingListener(OnSignalingListener(
|
||||||
|
onReceiveNewInvitation: (info) {
|
||||||
|
// 被邀请者收到:音视频通话邀请
|
||||||
|
},
|
||||||
|
onInviteeRejected: (info) {
|
||||||
|
// 邀请者收到:被邀请者拒绝音视频通话
|
||||||
|
},
|
||||||
|
onInviteeAccepted: (info) {
|
||||||
|
// 邀请者收到:被邀请者同意音视频通话
|
||||||
|
},
|
||||||
|
onInvitationTimeout: (info) {
|
||||||
|
// 邀请者收到:被邀请者超时未接通
|
||||||
|
},
|
||||||
|
onInvitationCancelled: (info) {
|
||||||
|
// 被邀请者收到:邀请者取消音视频通话
|
||||||
|
},
|
||||||
|
));
|
||||||
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -41,5 +41,5 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'io.openim:core-sdk:2.0.9.6@aar'
|
implementation 'io.openim:core-sdk:2.1.0.2@aar'
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,10 @@ class BaseManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Long int2long(MethodCall methodCall, String key) {
|
static Long int2long(MethodCall methodCall, String key) {
|
||||||
Integer i = value(methodCall, key);
|
Object i = value(methodCall, key);
|
||||||
return Long.valueOf(i);
|
if (i instanceof Long) {
|
||||||
|
return (Long) i;
|
||||||
|
}
|
||||||
|
return Long.valueOf((Integer) i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,4 +154,12 @@ public class ConversationManager extends BaseManager {
|
|||||||
public void getAtAllTag(MethodCall methodCall, MethodChannel.Result result) {
|
public void getAtAllTag(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getAtAllTag());
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getAtAllTag());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setGlobalRecvMessageOpt(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGlobalRecvMessageOpt(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
int2long(methodCall, "status")
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,4 +112,12 @@ public class FriendshipManager extends BaseManager {
|
|||||||
jsonValue(methodCall)
|
jsonValue(methodCall)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void searchFriends(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.searchFriends(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "searchParam")
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,4 +190,33 @@ public class GroupManager extends BaseManager {
|
|||||||
jsonValue(methodCall, "searchParam")
|
jsonValue(methodCall, "searchParam")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setGroupMemberRoleLevel(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGroupMemberRoleLevel(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "userID"),
|
||||||
|
int2long(methodCall, "roleLevel")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getGroupMemberListByJoinTimeFilter(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getGroupMemberListByJoinTimeFilter(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "offset"),
|
||||||
|
value(methodCall, "count"),
|
||||||
|
int2long(methodCall, "joinTimeBegin"),
|
||||||
|
int2long(methodCall, "joinTimeEnd"),
|
||||||
|
jsonValue(methodCall, "excludeUserIDList")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupVerification(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGroupVerification(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "needVerification")
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -47,4 +47,22 @@ public class OrganizationManager extends BaseManager {
|
|||||||
value(methodCall, "departmentID")
|
value(methodCall, "departmentID")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void getDepartmentInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getDepartmentInfo(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "departmentID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void searchOrganization(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.searchOrganization(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "searchParams"),
|
||||||
|
int2long(methodCall, "offset"),
|
||||||
|
int2long(methodCall, "count")
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ packages:
|
|||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.16.0"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -56,7 +56,7 @@ packages:
|
|||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.0"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -68,7 +68,7 @@ packages:
|
|||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "2.0.9"
|
version: "2.1.0+1"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -87,7 +87,7 @@ packages:
|
|||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.3"
|
version: "0.1.4"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -101,7 +101,7 @@ packages:
|
|||||||
name: path
|
name: path
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.1"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -113,7 +113,7 @@ packages:
|
|||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.2"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -148,21 +148,14 @@ packages:
|
|||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.8"
|
version: "0.4.9"
|
||||||
typed_data:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: typed_data
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.0"
|
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.14.0 <3.0.0"
|
dart: ">=2.17.0-0 <3.0.0"
|
||||||
flutter: ">=1.20.0"
|
flutter: ">=1.20.0"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public class ConversationManager: BaseServiceManager {
|
|||||||
self["deleteAllConversationFromLocal"] = deleteAllConversationFromLocal
|
self["deleteAllConversationFromLocal"] = deleteAllConversationFromLocal
|
||||||
self["resetConversationGroupAtType"] = resetConversationGroupAtType
|
self["resetConversationGroupAtType"] = resetConversationGroupAtType
|
||||||
self["getAtAllTag"] = getAtAllTag
|
self["getAtAllTag"] = getAtAllTag
|
||||||
|
self["setGlobalRecvMessageOpt"] = setGlobalRecvMessageOpt
|
||||||
}
|
}
|
||||||
|
|
||||||
func setConversationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setConversationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
@@ -103,6 +104,10 @@ public class ConversationManager: BaseServiceManager {
|
|||||||
func getAtAllTag(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getAtAllTag(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkGetAtAllTag())
|
callBack(result, Open_im_sdkGetAtAllTag())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func setGlobalRecvMessageOpt(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGlobalRecvMessageOpt(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[int: "status"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public class FriendshipManager: BaseServiceManager {
|
|||||||
self["deleteFriend"] = deleteFriend
|
self["deleteFriend"] = deleteFriend
|
||||||
self["acceptFriendApplication"] = acceptFriendApplication
|
self["acceptFriendApplication"] = acceptFriendApplication
|
||||||
self["refuseFriendApplication"] = refuseFriendApplication
|
self["refuseFriendApplication"] = refuseFriendApplication
|
||||||
|
self["searchFriends"] = searchFriends
|
||||||
// self["forceSyncFriendApplication"] = forceSyncFriendApplication
|
// self["forceSyncFriendApplication"] = forceSyncFriendApplication
|
||||||
// self["forceSyncFriend"] = forceSyncFriend
|
// self["forceSyncFriend"] = forceSyncFriend
|
||||||
// self["forceSyncBlackList"] = forceSyncBlackList
|
// self["forceSyncBlackList"] = forceSyncBlackList
|
||||||
@@ -81,6 +82,9 @@ public class FriendshipManager: BaseServiceManager {
|
|||||||
Open_im_sdkRefuseFriendApplication(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
Open_im_sdkRefuseFriendApplication(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func searchFriends(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSearchFriends(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"])
|
||||||
|
}
|
||||||
// func forceSyncFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
// func forceSyncFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
// Open_im_sdkForceSyncFriendApplication()
|
// Open_im_sdkForceSyncFriendApplication()
|
||||||
// callBack(result)
|
// callBack(result)
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ public class GroupManager: BaseServiceManager {
|
|||||||
self["changeGroupMemberMute"] = changeGroupMemberMute
|
self["changeGroupMemberMute"] = changeGroupMemberMute
|
||||||
self["setGroupMemberNickname"] = setGroupMemberNickname
|
self["setGroupMemberNickname"] = setGroupMemberNickname
|
||||||
self["searchGroups"] = searchGroups
|
self["searchGroups"] = searchGroups
|
||||||
|
self["setGroupMemberRoleLevel"] = setGroupMemberRoleLevel
|
||||||
|
self["getGroupMemberListByJoinTimeFilter"] = getGroupMemberListByJoinTimeFilter
|
||||||
|
self["setGroupVerification"] = setGroupVerification
|
||||||
}
|
}
|
||||||
|
|
||||||
func setGroupListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setGroupListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
@@ -115,6 +118,18 @@ public class GroupManager: BaseServiceManager {
|
|||||||
func searchGroups(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func searchGroups(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkSearchGroups(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"])
|
Open_im_sdkSearchGroups(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func setGroupMemberRoleLevel(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGroupMemberRoleLevel(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string:"userID"],methodCall[int:"roleLevel"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func getGroupMemberListByJoinTimeFilter(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkGetGroupMemberListByJoinTimeFilter(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[int32: "offset"], methodCall[int32: "count"], methodCall[int64: "joinTimeBegin"], methodCall[int64: "joinTimeEnd"], methodCall[jsonString: "excludeUserIDList"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGroupVerification(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGroupVerification(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[int32:"needVerification"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GroupListener: NSObject, Open_im_sdk_callbackOnGroupListenerProtocol {
|
public class GroupListener: NSObject, Open_im_sdk_callbackOnGroupListenerProtocol {
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ public class OrganizationManager: BaseServiceManager {
|
|||||||
self["getDepartmentMember"] = getDepartmentMember
|
self["getDepartmentMember"] = getDepartmentMember
|
||||||
self["getUserInDepartment"] = getUserInDepartment
|
self["getUserInDepartment"] = getUserInDepartment
|
||||||
self["getDepartmentMemberAndSubDepartment"] = getDepartmentMemberAndSubDepartment
|
self["getDepartmentMemberAndSubDepartment"] = getDepartmentMemberAndSubDepartment
|
||||||
|
self["getDepartmentInfo"] = getDepartmentInfo
|
||||||
|
self["searchOrganization"] = searchOrganization
|
||||||
}
|
}
|
||||||
|
|
||||||
func setOrganizationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setOrganizationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
@@ -32,6 +34,14 @@ public class OrganizationManager: BaseServiceManager {
|
|||||||
func getDepartmentMemberAndSubDepartment(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
func getDepartmentMemberAndSubDepartment(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
Open_im_sdkGetDepartmentMemberAndSubDepartment(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"])
|
Open_im_sdkGetDepartmentMemberAndSubDepartment(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getDepartmentInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
Open_im_sdkGetDepartmentInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func searchOrganization(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
Open_im_sdkSearchOrganization(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParams"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OrganizationListener: NSObject, Open_im_sdk_callbackOnOrganizationListenerProtocol {
|
public class OrganizationListener: NSObject, Open_im_sdk_callbackOnOrganizationListenerProtocol {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ A new Flutter project.
|
|||||||
s.dependency 'Flutter'
|
s.dependency 'Flutter'
|
||||||
s.platform = :ios, '8.0'
|
s.platform = :ios, '8.0'
|
||||||
|
|
||||||
s.dependency 'OpenIMSDKCore','2.0.9'
|
s.dependency 'OpenIMSDKCore','2.1.0'
|
||||||
s.static_framework = true
|
s.static_framework = true
|
||||||
# s.vendored_frameworks = 'Framework/*.framework'
|
# s.vendored_frameworks = 'Framework/*.framework'
|
||||||
# Flutter.framework does not contain a i386 slice.
|
# Flutter.framework does not contain a i386 slice.
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ library flutter_openim_sdk;
|
|||||||
export 'src/enum/conversation_type.dart';
|
export 'src/enum/conversation_type.dart';
|
||||||
export 'src/enum/group_at_type.dart';
|
export 'src/enum/group_at_type.dart';
|
||||||
export 'src/enum/group_role_level.dart';
|
export 'src/enum/group_role_level.dart';
|
||||||
|
export 'src/enum/group_verification.dart';
|
||||||
export 'src/enum/im_platform.dart';
|
export 'src/enum/im_platform.dart';
|
||||||
export 'src/enum/listener_type.dart';
|
export 'src/enum/listener_type.dart';
|
||||||
export 'src/enum/message_status.dart';
|
export 'src/enum/message_status.dart';
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
|
/// 会话类型
|
||||||
class ConversationType {
|
class ConversationType {
|
||||||
|
/// 单聊
|
||||||
static const single = 1;
|
static const single = 1;
|
||||||
|
|
||||||
|
/// 群聊
|
||||||
static const group = 2;
|
static const group = 2;
|
||||||
|
|
||||||
|
/// 通知
|
||||||
static const notification = 4;
|
static const notification = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,17 @@
|
|||||||
|
/// 会话强提示内容
|
||||||
class GroupAtType {
|
class GroupAtType {
|
||||||
|
/// 取消所有提示,即调用了resetConversationGroupAtType方法
|
||||||
static const atNormal = 0;
|
static const atNormal = 0;
|
||||||
|
|
||||||
|
/// @了我提示
|
||||||
static const atMe = 1;
|
static const atMe = 1;
|
||||||
|
|
||||||
|
/// @了所有人提示
|
||||||
static const atAll = 2;
|
static const atAll = 2;
|
||||||
|
|
||||||
|
/// @了所有人@了我
|
||||||
static const atAllAtMe = 3;
|
static const atAllAtMe = 3;
|
||||||
|
|
||||||
|
/// 群公告提示
|
||||||
|
static const groupNotification = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
/// 1 ordinary member, 2 group owners, 3 administrators
|
/// 群成员角色
|
||||||
/// 1普通成员, 2群主,3管理员
|
|
||||||
class GroupRoleLevel {
|
class GroupRoleLevel {
|
||||||
|
/// 普通成员
|
||||||
static const member = 1;
|
static const member = 1;
|
||||||
|
|
||||||
|
/// 群主
|
||||||
static const owner = 2;
|
static const owner = 2;
|
||||||
|
|
||||||
|
/// 管理员
|
||||||
static const admin = 3;
|
static const admin = 3;
|
||||||
}
|
}
|
||||||
|
|||||||
11
lib/src/enum/group_verification.dart
Normal file
11
lib/src/enum/group_verification.dart
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/// 进群验证设置选项
|
||||||
|
class GroupVerification {
|
||||||
|
/// 申请需要同意 邀请直接进
|
||||||
|
static const int applyNeedVerificationInviteDirectly = 0;
|
||||||
|
|
||||||
|
/// 所有人进群需要验证,除了群主管理员邀
|
||||||
|
static const int allNeedVerification = 1;
|
||||||
|
|
||||||
|
/// 直接进群
|
||||||
|
static const int directly = 2;
|
||||||
|
}
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
|
/// 当前flutter平台仅支持Android/ios
|
||||||
class IMPlatform {
|
class IMPlatform {
|
||||||
|
/// IOS
|
||||||
static const ios = 1;
|
static const ios = 1;
|
||||||
|
|
||||||
|
/// Android
|
||||||
static const android = 2;
|
static const android = 2;
|
||||||
static const windows = 3;
|
static const windows = 3;
|
||||||
static const xos = 4;
|
static const xos = 4;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/// callback类型
|
||||||
class ListenerType {
|
class ListenerType {
|
||||||
static final simpleMsgListener = 'simpleMsgListener';
|
static final simpleMsgListener = 'simpleMsgListener';
|
||||||
static final connectListener = 'connectListener';
|
static final connectListener = 'connectListener';
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
|
/// 消息发送状态
|
||||||
class MessageStatus {
|
class MessageStatus {
|
||||||
|
/// 发送中
|
||||||
static const sending = 1;
|
static const sending = 1;
|
||||||
|
|
||||||
|
/// 已发送成功
|
||||||
static const succeeded = 2;
|
static const succeeded = 2;
|
||||||
|
|
||||||
|
/// 发送失败
|
||||||
static const failed = 3;
|
static const failed = 3;
|
||||||
|
|
||||||
|
/// 已经删除
|
||||||
static const deleted = 4;
|
static const deleted = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,67 +1,154 @@
|
|||||||
|
/// 消息类型
|
||||||
class MessageType {
|
class MessageType {
|
||||||
///
|
/// 普通文本
|
||||||
static const text = 101;
|
static const text = 101;
|
||||||
|
|
||||||
|
/// 图片
|
||||||
static const picture = 102;
|
static const picture = 102;
|
||||||
|
|
||||||
|
/// 语音
|
||||||
static const voice = 103;
|
static const voice = 103;
|
||||||
|
|
||||||
|
/// 视频
|
||||||
static const video = 104;
|
static const video = 104;
|
||||||
|
|
||||||
|
/// 文件
|
||||||
static const file = 105;
|
static const file = 105;
|
||||||
|
|
||||||
|
/// @消息
|
||||||
static const at_text = 106;
|
static const at_text = 106;
|
||||||
|
|
||||||
|
/// 合并
|
||||||
static const merger = 107;
|
static const merger = 107;
|
||||||
|
|
||||||
|
/// 名片
|
||||||
static const card = 108;
|
static const card = 108;
|
||||||
|
|
||||||
|
/// 位置
|
||||||
static const location = 109;
|
static const location = 109;
|
||||||
|
|
||||||
|
/// 自定义
|
||||||
static const custom = 110;
|
static const custom = 110;
|
||||||
|
|
||||||
|
/// 撤回
|
||||||
static const revoke = 111;
|
static const revoke = 111;
|
||||||
|
|
||||||
|
/// 已读回执
|
||||||
static const has_read_receipt = 112;
|
static const has_read_receipt = 112;
|
||||||
|
|
||||||
|
/// 正字输入
|
||||||
static const typing = 113;
|
static const typing = 113;
|
||||||
|
|
||||||
|
/// 引用回复
|
||||||
static const quote = 114;
|
static const quote = 114;
|
||||||
|
|
||||||
|
/// 自定义表情
|
||||||
static const custom_face = 115;
|
static const custom_face = 115;
|
||||||
|
|
||||||
///
|
/// 通知类型
|
||||||
static const notificationBegin = 1000;
|
static const notificationBegin = 1000;
|
||||||
|
|
||||||
static const friendNotificationBegin = 1200;
|
static const friendNotificationBegin = 1200;
|
||||||
|
|
||||||
|
/// 好友申请已接受
|
||||||
static const friendApplicationApprovedNotification = 1201;
|
static const friendApplicationApprovedNotification = 1201;
|
||||||
|
|
||||||
|
/// 好友申请已拒绝
|
||||||
static const friendApplicationRejectedNotification = 1202;
|
static const friendApplicationRejectedNotification = 1202;
|
||||||
|
|
||||||
|
/// 好友申请
|
||||||
static const friendApplicationNotification = 1203;
|
static const friendApplicationNotification = 1203;
|
||||||
|
|
||||||
|
/// 好友已添加
|
||||||
static const friendAddedNotification = 1204;
|
static const friendAddedNotification = 1204;
|
||||||
|
|
||||||
|
/// 好友已删除
|
||||||
static const friendDeletedNotification = 1205;
|
static const friendDeletedNotification = 1205;
|
||||||
|
|
||||||
|
/// 设置好友备注
|
||||||
static const friendRemarkSetNotification = 1206;
|
static const friendRemarkSetNotification = 1206;
|
||||||
|
|
||||||
|
/// 好友加入黑名单
|
||||||
static const blackAddedNotification = 1207;
|
static const blackAddedNotification = 1207;
|
||||||
|
|
||||||
|
/// 已从黑名单移除
|
||||||
static const blackDeletedNotification = 1208;
|
static const blackDeletedNotification = 1208;
|
||||||
|
|
||||||
static const friendNotificationEnd = 1299;
|
static const friendNotificationEnd = 1299;
|
||||||
|
|
||||||
|
/// 会话改变
|
||||||
static const conversationChangeNotification = 1300;
|
static const conversationChangeNotification = 1300;
|
||||||
|
|
||||||
static const userNotificationBegin = 1301;
|
static const userNotificationBegin = 1301;
|
||||||
|
|
||||||
|
/// 用户信息改变
|
||||||
static const userInfoUpdatedNotification = 1303;
|
static const userInfoUpdatedNotification = 1303;
|
||||||
|
|
||||||
static const userNotificationEnd = 1399;
|
static const userNotificationEnd = 1399;
|
||||||
|
|
||||||
|
/// OA通知
|
||||||
static const oaNotification = 1400;
|
static const oaNotification = 1400;
|
||||||
|
|
||||||
static const groupNotificationBegin = 1500;
|
static const groupNotificationBegin = 1500;
|
||||||
|
|
||||||
|
/// 群已被创建
|
||||||
static const groupCreatedNotification = 1501;
|
static const groupCreatedNotification = 1501;
|
||||||
|
|
||||||
|
/// 群资料改变
|
||||||
static const groupInfoSetNotification = 1502;
|
static const groupInfoSetNotification = 1502;
|
||||||
|
|
||||||
|
/// 进群申请
|
||||||
static const joinGroupApplicationNotification = 1503;
|
static const joinGroupApplicationNotification = 1503;
|
||||||
|
|
||||||
|
/// 群成员退出
|
||||||
static const memberQuitNotification = 1504;
|
static const memberQuitNotification = 1504;
|
||||||
|
|
||||||
|
/// 群申请被接受
|
||||||
static const groupApplicationAcceptedNotification = 1505;
|
static const groupApplicationAcceptedNotification = 1505;
|
||||||
|
|
||||||
|
/// 群申请被拒绝
|
||||||
static const groupApplicationRejectedNotification = 1506;
|
static const groupApplicationRejectedNotification = 1506;
|
||||||
|
|
||||||
|
/// 群拥有者权限转移
|
||||||
static const groupOwnerTransferredNotification = 1507;
|
static const groupOwnerTransferredNotification = 1507;
|
||||||
|
|
||||||
|
/// 群成员被踢出群
|
||||||
static const memberKickedNotification = 1508;
|
static const memberKickedNotification = 1508;
|
||||||
|
|
||||||
|
/// 邀请进群
|
||||||
static const memberInvitedNotification = 1509;
|
static const memberInvitedNotification = 1509;
|
||||||
|
|
||||||
|
/// 群成员进群
|
||||||
static const memberEnterNotification = 1510;
|
static const memberEnterNotification = 1510;
|
||||||
|
|
||||||
|
/// 解散群
|
||||||
static const dismissGroupNotification = 1511;
|
static const dismissGroupNotification = 1511;
|
||||||
|
|
||||||
static const groupNotificationEnd = 1599;
|
static const groupNotificationEnd = 1599;
|
||||||
|
|
||||||
|
/// 群成员被禁言
|
||||||
static const groupMemberMutedNotification = 1512;
|
static const groupMemberMutedNotification = 1512;
|
||||||
|
|
||||||
|
/// 群成员被取消禁言
|
||||||
static const groupMemberCancelMutedNotification = 1513;
|
static const groupMemberCancelMutedNotification = 1513;
|
||||||
|
|
||||||
|
/// 群禁言
|
||||||
static const groupMutedNotification = 1514;
|
static const groupMutedNotification = 1514;
|
||||||
|
|
||||||
|
/// 取消群禁言
|
||||||
static const groupCancelMutedNotification = 1515;
|
static const groupCancelMutedNotification = 1515;
|
||||||
|
|
||||||
|
/// 群成员信息改变
|
||||||
static const groupMemberInfoChangedNotification = 1516;
|
static const groupMemberInfoChangedNotification = 1516;
|
||||||
|
|
||||||
static const signalingNotificationBegin = 1600;
|
static const signalingNotificationBegin = 1600;
|
||||||
|
|
||||||
|
/// 信令
|
||||||
static const signalingNotification = 1601;
|
static const signalingNotification = 1601;
|
||||||
|
|
||||||
static const signalingNotificationEnd = 1699;
|
static const signalingNotificationEnd = 1699;
|
||||||
|
|
||||||
|
/// 阅后即焚
|
||||||
static const burnAfterReadingNotification = 1701;
|
static const burnAfterReadingNotification = 1701;
|
||||||
|
|
||||||
static const notificationEnd = 2000;
|
static const notificationEnd = 2000;
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
|
|
||||||
|
/// 消息监听
|
||||||
class OnAdvancedMsgListener {
|
class OnAdvancedMsgListener {
|
||||||
/// Message read receipt
|
|
||||||
Function(List<ReadReceiptInfo> list)? onRecvC2CMessageReadReceipt;
|
Function(List<ReadReceiptInfo> list)? onRecvC2CMessageReadReceipt;
|
||||||
|
|
||||||
Function(List<ReadReceiptInfo> list)? onRecvGroupMessageReadReceipt;
|
Function(List<ReadReceiptInfo> list)? onRecvGroupMessageReadReceipt;
|
||||||
|
|
||||||
/// A friend revoked a message
|
|
||||||
Function(String msgId)? onRecvMessageRevoked;
|
Function(String msgId)? onRecvMessageRevoked;
|
||||||
|
|
||||||
/// Receive new message
|
|
||||||
Function(Message msg)? onRecvNewMessage;
|
Function(Message msg)? onRecvNewMessage;
|
||||||
|
|
||||||
/// Uniquely identifies
|
/// Uniquely identifies
|
||||||
@@ -22,18 +17,22 @@ class OnAdvancedMsgListener {
|
|||||||
this.onRecvNewMessage,
|
this.onRecvNewMessage,
|
||||||
}) : id = "id_${DateTime.now().microsecondsSinceEpoch}";
|
}) : id = "id_${DateTime.now().microsecondsSinceEpoch}";
|
||||||
|
|
||||||
|
/// C2C消息已读回执
|
||||||
void recvC2CMessageReadReceipt(List<ReadReceiptInfo> list) {
|
void recvC2CMessageReadReceipt(List<ReadReceiptInfo> list) {
|
||||||
onRecvC2CMessageReadReceipt?.call(list);
|
onRecvC2CMessageReadReceipt?.call(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群消息已读回执
|
||||||
void recvGroupMessageReadReceipt(List<ReadReceiptInfo> list) {
|
void recvGroupMessageReadReceipt(List<ReadReceiptInfo> list) {
|
||||||
onRecvGroupMessageReadReceipt?.call(list);
|
onRecvGroupMessageReadReceipt?.call(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 消息被撤回
|
||||||
void recvMessageRevoked(String msgId) {
|
void recvMessageRevoked(String msgId) {
|
||||||
onRecvMessageRevoked?.call(msgId);
|
onRecvMessageRevoked?.call(msgId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 收到了一条新消息
|
||||||
void recvNewMessage(Message msg) {
|
void recvNewMessage(Message msg) {
|
||||||
onRecvNewMessage?.call(msg);
|
onRecvNewMessage?.call(msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,9 @@
|
|||||||
|
/// SDK 连接状态监听
|
||||||
class OnConnectListener {
|
class OnConnectListener {
|
||||||
/// SDK failed to connect to the server
|
|
||||||
Function(int? code, String? errorMsg)? onConnectFailed;
|
Function(int? code, String? errorMsg)? onConnectFailed;
|
||||||
|
|
||||||
/// SDK has successfully connected to the server
|
|
||||||
Function()? onConnectSuccess;
|
Function()? onConnectSuccess;
|
||||||
|
|
||||||
/// SDK is connecting to the server
|
|
||||||
Function()? onConnecting;
|
Function()? onConnecting;
|
||||||
|
|
||||||
/// The current user is kicked offline.
|
|
||||||
/// At this time, the UI can prompt the user and call IMManager's login() function to log in again.
|
|
||||||
Function()? onKickedOffline;
|
Function()? onKickedOffline;
|
||||||
|
|
||||||
/// Ticket expired when online.
|
|
||||||
/// At this time, you need to generate a new userSig and call IMManager's login() function to log in again
|
|
||||||
Function()? onUserSigExpired;
|
Function()? onUserSigExpired;
|
||||||
|
|
||||||
OnConnectListener({
|
OnConnectListener({
|
||||||
@@ -24,22 +14,27 @@ class OnConnectListener {
|
|||||||
this.onUserSigExpired,
|
this.onUserSigExpired,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// SDK连接服务器失败
|
||||||
void connectFailed(int? code, String? errorMsg) {
|
void connectFailed(int? code, String? errorMsg) {
|
||||||
if (null != onConnectFailed) onConnectFailed!(code, errorMsg);
|
if (null != onConnectFailed) onConnectFailed!(code, errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// SDK连接服务器成功
|
||||||
void connectSuccess() {
|
void connectSuccess() {
|
||||||
if (null != onConnectSuccess) onConnectSuccess!();
|
if (null != onConnectSuccess) onConnectSuccess!();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// SDK正在连接服务器
|
||||||
void connecting() {
|
void connecting() {
|
||||||
if (null != onConnecting) onConnecting!.call();
|
if (null != onConnecting) onConnecting!.call();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 账号已在其他地方登录,当前设备被踢下线
|
||||||
void kickedOffline() {
|
void kickedOffline() {
|
||||||
if (null != onKickedOffline) onKickedOffline!();
|
if (null != onKickedOffline) onKickedOffline!();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 登录凭证过期,需要重新登录
|
||||||
void userSigExpired() {
|
void userSigExpired() {
|
||||||
if (null != onUserSigExpired) onUserSigExpired!();
|
if (null != onUserSigExpired) onUserSigExpired!();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
|
|
||||||
|
/// 会话监听
|
||||||
class OnConversationListener {
|
class OnConversationListener {
|
||||||
Function(List<ConversationInfo> list)? onConversationChanged;
|
Function(List<ConversationInfo> list)? onConversationChanged;
|
||||||
Function(List<ConversationInfo> list)? onNewConversation;
|
Function(List<ConversationInfo> list)? onNewConversation;
|
||||||
@@ -17,14 +18,22 @@ class OnConversationListener {
|
|||||||
this.onSyncServerStart,
|
this.onSyncServerStart,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// 会话发生改变
|
||||||
void conversationChanged(List<ConversationInfo> list) {
|
void conversationChanged(List<ConversationInfo> list) {
|
||||||
if (onConversationChanged != null) onConversationChanged!(list);
|
if (onConversationChanged != null) onConversationChanged!(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 有新会话产生
|
||||||
void newConversation(List<ConversationInfo> list) {
|
void newConversation(List<ConversationInfo> list) {
|
||||||
if (onNewConversation != null) onNewConversation!(list);
|
if (onNewConversation != null) onNewConversation!(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 未读消息总数发送改变
|
||||||
|
void totalUnreadMessageCountChanged(int i) {
|
||||||
|
if (onTotalUnreadMessageCountChanged != null)
|
||||||
|
onTotalUnreadMessageCountChanged!(i);
|
||||||
|
}
|
||||||
|
|
||||||
void syncServerFailed() {
|
void syncServerFailed() {
|
||||||
if (onSyncServerFailed != null) onSyncServerFailed!();
|
if (onSyncServerFailed != null) onSyncServerFailed!();
|
||||||
}
|
}
|
||||||
@@ -36,9 +45,4 @@ class OnConversationListener {
|
|||||||
void syncServerStart() {
|
void syncServerStart() {
|
||||||
if (onSyncServerStart != null) onSyncServerStart!();
|
if (onSyncServerStart != null) onSyncServerStart!();
|
||||||
}
|
}
|
||||||
|
|
||||||
void totalUnreadMessageCountChanged(int i) {
|
|
||||||
if (onTotalUnreadMessageCountChanged != null)
|
|
||||||
onTotalUnreadMessageCountChanged!(i);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
|
|
||||||
|
/// 好友关系监听
|
||||||
class OnFriendshipListener {
|
class OnFriendshipListener {
|
||||||
Function(FriendApplicationInfo i)? onFriendApplicationAdded;
|
Function(FriendApplicationInfo i)? onFriendApplicationAdded;
|
||||||
Function(FriendApplicationInfo i)? onFriendApplicationDeleted;
|
Function(FriendApplicationInfo i)? onFriendApplicationDeleted;
|
||||||
@@ -23,38 +24,47 @@ class OnFriendshipListener {
|
|||||||
this.onFriendInfoChanged,
|
this.onFriendInfoChanged,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// 已被加入黑名单
|
||||||
void blacklistAdded(BlacklistInfo u) {
|
void blacklistAdded(BlacklistInfo u) {
|
||||||
onBlacklistAdded?.call(u);
|
onBlacklistAdded?.call(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 已从黑名单移除
|
||||||
void blacklistDeleted(BlacklistInfo u) {
|
void blacklistDeleted(BlacklistInfo u) {
|
||||||
onBlacklistDeleted?.call(u);
|
onBlacklistDeleted?.call(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 好友已添加
|
||||||
void friendAdded(FriendInfo u) {
|
void friendAdded(FriendInfo u) {
|
||||||
onFriendAdded?.call(u);
|
onFriendAdded?.call(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 好友申请已被接受
|
||||||
void friendApplicationAccepted(FriendApplicationInfo u) {
|
void friendApplicationAccepted(FriendApplicationInfo u) {
|
||||||
onFriendApplicationAccepted?.call(u);
|
onFriendApplicationAccepted?.call(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 已添加新的好友申请
|
||||||
void friendApplicationAdded(FriendApplicationInfo u) {
|
void friendApplicationAdded(FriendApplicationInfo u) {
|
||||||
onFriendApplicationAdded?.call(u);
|
onFriendApplicationAdded?.call(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 好友申请已被删除
|
||||||
void friendApplicationDeleted(FriendApplicationInfo u) {
|
void friendApplicationDeleted(FriendApplicationInfo u) {
|
||||||
onFriendApplicationDeleted?.call(u);
|
onFriendApplicationDeleted?.call(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 好友申请已被拒绝
|
||||||
void friendApplicationRejected(FriendApplicationInfo u) {
|
void friendApplicationRejected(FriendApplicationInfo u) {
|
||||||
onFriendApplicationRejected?.call(u);
|
onFriendApplicationRejected?.call(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 好友已被删除
|
||||||
void friendDeleted(FriendInfo u) {
|
void friendDeleted(FriendInfo u) {
|
||||||
onFriendDeleted?.call(u);
|
onFriendDeleted?.call(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 好友资料发生改变
|
||||||
void friendInfoChanged(FriendInfo u) {
|
void friendInfoChanged(FriendInfo u) {
|
||||||
onFriendInfoChanged?.call(u);
|
onFriendInfoChanged?.call(u);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
|
|
||||||
|
/// 群组监听
|
||||||
class OnGroupListener {
|
class OnGroupListener {
|
||||||
Function(GroupApplicationInfo info)? onGroupApplicationAccepted;
|
Function(GroupApplicationInfo info)? onGroupApplicationAccepted;
|
||||||
Function(GroupApplicationInfo info)? onGroupApplicationAdded;
|
Function(GroupApplicationInfo info)? onGroupApplicationAdded;
|
||||||
@@ -25,42 +26,52 @@ class OnGroupListener {
|
|||||||
this.onJoinedGroupDeleted,
|
this.onJoinedGroupDeleted,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// 群申请已被接受
|
||||||
void groupApplicationAccepted(GroupApplicationInfo info) {
|
void groupApplicationAccepted(GroupApplicationInfo info) {
|
||||||
onGroupApplicationAccepted?.call(info);
|
onGroupApplicationAccepted?.call(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群申请已被添加
|
||||||
void groupApplicationAdded(GroupApplicationInfo info) {
|
void groupApplicationAdded(GroupApplicationInfo info) {
|
||||||
onGroupApplicationAdded?.call(info);
|
onGroupApplicationAdded?.call(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群申请已被删除
|
||||||
void groupApplicationDeleted(GroupApplicationInfo info) {
|
void groupApplicationDeleted(GroupApplicationInfo info) {
|
||||||
onGroupApplicationDeleted?.call(info);
|
onGroupApplicationDeleted?.call(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群申请已被拒绝
|
||||||
void groupApplicationRejected(GroupApplicationInfo info) {
|
void groupApplicationRejected(GroupApplicationInfo info) {
|
||||||
onGroupApplicationRejected?.call(info);
|
onGroupApplicationRejected?.call(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群资料发生改变
|
||||||
void groupInfoChanged(GroupInfo info) {
|
void groupInfoChanged(GroupInfo info) {
|
||||||
onGroupInfoChanged?.call(info);
|
onGroupInfoChanged?.call(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群成员已添加
|
||||||
void groupMemberAdded(GroupMembersInfo info) {
|
void groupMemberAdded(GroupMembersInfo info) {
|
||||||
onGroupMemberAdded?.call(info);
|
onGroupMemberAdded?.call(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群成员已删除
|
||||||
void groupMemberDeleted(GroupMembersInfo info) {
|
void groupMemberDeleted(GroupMembersInfo info) {
|
||||||
onGroupMemberDeleted?.call(info);
|
onGroupMemberDeleted?.call(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群成员信息发送改变
|
||||||
void groupMemberInfoChanged(GroupMembersInfo info) {
|
void groupMemberInfoChanged(GroupMembersInfo info) {
|
||||||
onGroupMemberInfoChanged?.call(info);
|
onGroupMemberInfoChanged?.call(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 已加入的群有新增
|
||||||
void joinedGroupAdded(GroupInfo info) {
|
void joinedGroupAdded(GroupInfo info) {
|
||||||
onJoinedGroupAdded?.call(info);
|
onJoinedGroupAdded?.call(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 已加入的群减少
|
||||||
void joinedGroupDeleted(GroupInfo info) {
|
void joinedGroupDeleted(GroupInfo info) {
|
||||||
onJoinedGroupDeleted?.call(info);
|
onJoinedGroupDeleted?.call(info);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
|
/// 消息发送进度监听
|
||||||
class OnMsgSendProgressListener {
|
class OnMsgSendProgressListener {
|
||||||
Function(String clientMsgID, int progress)? onProgress;
|
Function(String clientMsgID, int progress)? onProgress;
|
||||||
|
|
||||||
OnMsgSendProgressListener({this.onProgress});
|
OnMsgSendProgressListener({this.onProgress});
|
||||||
|
|
||||||
|
/// 消息发送进度
|
||||||
void progress(String clientMsgID, int progress) {
|
void progress(String clientMsgID, int progress) {
|
||||||
if (null != onProgress) onProgress!(clientMsgID, progress);
|
if (null != onProgress) onProgress!(clientMsgID, progress);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
|
/// 组织架构监听
|
||||||
class OnOrganizationListener {
|
class OnOrganizationListener {
|
||||||
Function()? onOrganizationUpdated;
|
Function()? onOrganizationUpdated;
|
||||||
|
|
||||||
OnOrganizationListener({this.onOrganizationUpdated});
|
OnOrganizationListener({this.onOrganizationUpdated});
|
||||||
|
|
||||||
|
/// 组织架构有更新
|
||||||
void organizationUpdated() {
|
void organizationUpdated() {
|
||||||
onOrganizationUpdated?.call();
|
onOrganizationUpdated?.call();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter_openim_sdk/src/models/signaling_info.dart';
|
import 'package:flutter_openim_sdk/src/models/signaling_info.dart';
|
||||||
|
|
||||||
|
/// 信令监听
|
||||||
class OnSignalingListener {
|
class OnSignalingListener {
|
||||||
final Function(SignalingInfo info)? onInvitationCancelled;
|
final Function(SignalingInfo info)? onInvitationCancelled;
|
||||||
final Function(SignalingInfo info)? onInvitationTimeout;
|
final Function(SignalingInfo info)? onInvitationTimeout;
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
|
|
||||||
|
/// 当前用户资料监听
|
||||||
class OnUserListener {
|
class OnUserListener {
|
||||||
/// The information of the logged-in user has been updated
|
/// The information of the logged-in user has been updated
|
||||||
Function(UserInfo info)? onSelfInfoUpdated;
|
Function(UserInfo info)? onSelfInfoUpdated;
|
||||||
|
|
||||||
OnUserListener({this.onSelfInfoUpdated});
|
OnUserListener({this.onSelfInfoUpdated});
|
||||||
|
|
||||||
|
/// 自身信息发送变化回调
|
||||||
void selfInfoUpdated(UserInfo info) {
|
void selfInfoUpdated(UserInfo info) {
|
||||||
onSelfInfoUpdated?.call(info);
|
onSelfInfoUpdated?.call(info);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
|
/// 朋友圈监听
|
||||||
class OnWorkMomentsListener {
|
class OnWorkMomentsListener {
|
||||||
Function()? onRecvNewNotification;
|
Function()? onRecvNewNotification;
|
||||||
|
|
||||||
OnWorkMomentsListener({this.onRecvNewNotification});
|
OnWorkMomentsListener({this.onRecvNewNotification});
|
||||||
|
|
||||||
|
/// 朋友圈信息发送改变
|
||||||
void recvNewNotification() {
|
void recvNewNotification() {
|
||||||
onRecvNewNotification?.call();
|
onRecvNewNotification?.call();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,14 +7,12 @@ class ConversationManager {
|
|||||||
|
|
||||||
ConversationManager(this._channel);
|
ConversationManager(this._channel);
|
||||||
|
|
||||||
/// Observe conversation changes
|
|
||||||
/// 会话监听
|
/// 会话监听
|
||||||
Future setConversationListener(OnConversationListener listener) {
|
Future setConversationListener(OnConversationListener listener) {
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
return _channel.invokeMethod('setConversationListener', _buildParam({}));
|
return _channel.invokeMethod('setConversationListener', _buildParam({}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get all conversations
|
|
||||||
/// 获取所有会话
|
/// 获取所有会话
|
||||||
Future<List<ConversationInfo>> getAllConversationList(
|
Future<List<ConversationInfo>> getAllConversationList(
|
||||||
{String? operationID}) =>
|
{String? operationID}) =>
|
||||||
@@ -27,8 +25,9 @@ class ConversationManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (map) => ConversationInfo.fromJson(map)));
|
Utils.toList(value, (map) => ConversationInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Paging to get conversation
|
|
||||||
/// 分页获取会话
|
/// 分页获取会话
|
||||||
|
/// [offset] 开始下标
|
||||||
|
/// [count] 每页数量
|
||||||
Future<List<ConversationInfo>> getConversationListSplit({
|
Future<List<ConversationInfo>> getConversationListSplit({
|
||||||
int offset = 0,
|
int offset = 0,
|
||||||
int count = 20,
|
int count = 20,
|
||||||
@@ -45,12 +44,9 @@ class ConversationManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (map) => ConversationInfo.fromJson(map)));
|
Utils.toList(value, (map) => ConversationInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Get a conversation, if it doesn't exist it will be created automatically
|
/// 查询会话,如果会话不存在会自动生成一个
|
||||||
/// [sourceID] if it is a single chat, Its value is userID. if it is a group chat, Its value is groupID
|
/// [sourceID] 如果是单聊会话传userID,如果是群聊会话传GroupID
|
||||||
/// [sessionType] if it is a single chat, it value is 1. if it is a group chat, it value is 2
|
/// [sessionType] 如果是单聊会话传1,如果是群聊会话传2
|
||||||
/// 获取一个会话,如果不存在会自动创建
|
|
||||||
/// [sourceID] 如果是单聊值传用户ID,如果是群聊值传组ID
|
|
||||||
/// [sessionType] 如果是单聊值传1,如果是群聊值传2
|
|
||||||
Future<ConversationInfo> getOneConversation({
|
Future<ConversationInfo> getOneConversation({
|
||||||
required String sourceID,
|
required String sourceID,
|
||||||
required int sessionType,
|
required int sessionType,
|
||||||
@@ -67,8 +63,8 @@ class ConversationManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toObj(value, (map) => ConversationInfo.fromJson(map)));
|
Utils.toObj(value, (map) => ConversationInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Get conversation list by id list
|
/// 根据会话id获取多个会话
|
||||||
/// 获取多个会话
|
/// [conversationIDList] 会话id列表
|
||||||
Future<List<ConversationInfo>> getMultipleConversation({
|
Future<List<ConversationInfo>> getMultipleConversation({
|
||||||
required List<String> conversationIDList,
|
required List<String> conversationIDList,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -83,8 +79,8 @@ class ConversationManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (map) => ConversationInfo.fromJson(map)));
|
Utils.toList(value, (map) => ConversationInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Delete conversation by id
|
/// 通过会话id删除指定会话
|
||||||
/// 删除会话
|
/// [conversationID] 被删除的会话的id
|
||||||
Future deleteConversation({
|
Future deleteConversation({
|
||||||
required String conversationID,
|
required String conversationID,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -96,8 +92,9 @@ class ConversationManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Set draft
|
|
||||||
/// 设置会话草稿
|
/// 设置会话草稿
|
||||||
|
/// [conversationID] 会话id
|
||||||
|
/// [draftText] 草稿
|
||||||
Future setConversationDraft({
|
Future setConversationDraft({
|
||||||
required String conversationID,
|
required String conversationID,
|
||||||
required String draftText,
|
required String draftText,
|
||||||
@@ -111,8 +108,9 @@ class ConversationManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Pinned conversation
|
|
||||||
/// 置顶会话
|
/// 置顶会话
|
||||||
|
/// [conversationID] 会话id
|
||||||
|
/// [isPinned] true:置顶,false:取消置顶
|
||||||
Future pinConversation({
|
Future pinConversation({
|
||||||
required String conversationID,
|
required String conversationID,
|
||||||
required bool isPinned,
|
required bool isPinned,
|
||||||
@@ -126,12 +124,8 @@ class ConversationManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Future<dynamic> markSingleMessageHasRead({required String userID}) =>
|
|
||||||
// _channel.invokeMethod(
|
|
||||||
// 'markSingleMessageHasRead', _buildParam({'userID': userID}));
|
|
||||||
|
|
||||||
/// Mark group chat all messages as read
|
|
||||||
/// 标记群聊会话已读
|
/// 标记群聊会话已读
|
||||||
|
/// [groupID] 群id
|
||||||
Future<dynamic> markGroupMessageHasRead({
|
Future<dynamic> markGroupMessageHasRead({
|
||||||
required String groupID,
|
required String groupID,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -143,7 +137,6 @@ class ConversationManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Get the total number of unread messages
|
|
||||||
/// 获取未读消息总数
|
/// 获取未读消息总数
|
||||||
Future<dynamic> getTotalUnreadMsgCount({
|
Future<dynamic> getTotalUnreadMsgCount({
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -154,9 +147,6 @@ class ConversationManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Query conversation id
|
|
||||||
/// [sourceID] if it is a single chat, Its value is userID. if it is a group chat, Its value is groupID
|
|
||||||
/// [sessionType] if it is a single chat, it value is 1. if it is a group chat, it value is 2
|
|
||||||
/// 查询会话id
|
/// 查询会话id
|
||||||
/// [sourceID] 如果是单聊值传用户ID,如果是群聊值传组ID
|
/// [sourceID] 如果是单聊值传用户ID,如果是群聊值传组ID
|
||||||
/// [sessionType] 如果是单聊值传1,如果是群聊值传2
|
/// [sessionType] 如果是单聊值传1,如果是群聊值传2
|
||||||
@@ -171,9 +161,8 @@ class ConversationManager {
|
|||||||
"sessionType": sessionType,
|
"sessionType": sessionType,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Message Do Not Disturb
|
|
||||||
/// [status] 0: Normal. 1: Do not receive messages. 2: Do not notify when messages are received.
|
|
||||||
/// 消息免打扰设置
|
/// 消息免打扰设置
|
||||||
|
/// [conversationIDList] 会话id列表
|
||||||
/// [status] 0:正常;1:不接受消息;2:接受在线消息不接受离线消息;
|
/// [status] 0:正常;1:不接受消息;2:接受在线消息不接受离线消息;
|
||||||
Future<dynamic> setConversationRecvMessageOpt({
|
Future<dynamic> setConversationRecvMessageOpt({
|
||||||
required List<String> conversationIDList,
|
required List<String> conversationIDList,
|
||||||
@@ -188,9 +177,9 @@ class ConversationManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Message Do Not Disturb
|
|
||||||
/// [{"conversationId":"single_13922222222","result":0}]
|
|
||||||
/// 查询免打扰状态
|
/// 查询免打扰状态
|
||||||
|
/// [conversationIDList] 会话id列表
|
||||||
|
/// 返回:[{"conversationId":"single_13922222222","result":0}],result值:0:正常;1:不接受消息;2:接受在线消息不接受离线消息;
|
||||||
Future<List<dynamic>> getConversationRecvMessageOpt({
|
Future<List<dynamic>> getConversationRecvMessageOpt({
|
||||||
required List<String> conversationIDList,
|
required List<String> conversationIDList,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -204,8 +193,9 @@ class ConversationManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toListMap(value));
|
.then((value) => Utils.toListMap(value));
|
||||||
|
|
||||||
/// burn after reading
|
|
||||||
/// 阅后即焚
|
/// 阅后即焚
|
||||||
|
/// [conversationID] 会话id
|
||||||
|
/// [isPrivate] true:开启,false:关闭
|
||||||
Future<dynamic> setOneConversationPrivateChat({
|
Future<dynamic> setOneConversationPrivateChat({
|
||||||
required String conversationID,
|
required String conversationID,
|
||||||
required bool isPrivate,
|
required bool isPrivate,
|
||||||
@@ -219,8 +209,8 @@ class ConversationManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Delete conversation from local and service
|
/// 删除本地以及服务器的会话
|
||||||
/// 删除会话
|
/// [conversationID] 会话ID
|
||||||
Future<dynamic> deleteConversationFromLocalAndSvr({
|
Future<dynamic> deleteConversationFromLocalAndSvr({
|
||||||
required String conversationID,
|
required String conversationID,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -232,8 +222,7 @@ class ConversationManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Delete conversation from local
|
/// 删除所有本地会话
|
||||||
/// 删除会话
|
|
||||||
Future<dynamic> deleteAllConversationFromLocal({
|
Future<dynamic> deleteAllConversationFromLocal({
|
||||||
String? operationID,
|
String? operationID,
|
||||||
}) =>
|
}) =>
|
||||||
@@ -243,8 +232,8 @@ class ConversationManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Reset group converstaion at type
|
/// 重置强提醒标识[GroupAtType]
|
||||||
/// 重置at标准位
|
/// [conversationID] 会话id
|
||||||
Future<dynamic> resetConversationGroupAtType({
|
Future<dynamic> resetConversationGroupAtType({
|
||||||
required String conversationID,
|
required String conversationID,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -256,12 +245,23 @@ class ConversationManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Get @ all member tag
|
/// 查询@所有人标识
|
||||||
/// 查询at所有人标识
|
|
||||||
Future<dynamic> getAtAllTag() =>
|
Future<dynamic> getAtAllTag() =>
|
||||||
_channel.invokeMethod('getAtAllTag', _buildParam({}));
|
_channel.invokeMethod('getAtAllTag', _buildParam({}));
|
||||||
|
|
||||||
/// Custom sort for conversation list
|
/// 全局免打扰
|
||||||
|
/// [status] 0:正常;1:不接受消息;2:接受在线消息不接受离线消息;
|
||||||
|
Future<dynamic> setGlobalRecvMessageOpt({
|
||||||
|
required int status,
|
||||||
|
String? operationID,
|
||||||
|
}) =>
|
||||||
|
_channel.invokeMethod(
|
||||||
|
'setGlobalRecvMessageOpt',
|
||||||
|
_buildParam({
|
||||||
|
"status": status,
|
||||||
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
|
}));
|
||||||
|
|
||||||
/// 会话列表自定义排序规则。
|
/// 会话列表自定义排序规则。
|
||||||
List<ConversationInfo> simpleSort(List<ConversationInfo> list) => list
|
List<ConversationInfo> simpleSort(List<ConversationInfo> list) => list
|
||||||
..sort((a, b) {
|
..sort((a, b) {
|
||||||
|
|||||||
@@ -7,16 +7,14 @@ class FriendshipManager {
|
|||||||
|
|
||||||
FriendshipManager(this._channel);
|
FriendshipManager(this._channel);
|
||||||
|
|
||||||
/// Set up a friend relationship listener
|
|
||||||
/// 好友关系监听
|
/// 好友关系监听
|
||||||
Future setFriendshipListener(OnFriendshipListener listener) {
|
Future setFriendshipListener(OnFriendshipListener listener) {
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
return _channel.invokeMethod('setFriendListener', _buildParam({}));
|
return _channel.invokeMethod('setFriendListener', _buildParam({}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get friend info by user id
|
|
||||||
/// 查询好友信息
|
/// 查询好友信息
|
||||||
/// [uidList] 好友的userID集合
|
/// [uidList] userID集合
|
||||||
Future<List<UserInfo>> getFriendsInfo({
|
Future<List<UserInfo>> getFriendsInfo({
|
||||||
required List<String> uidList,
|
required List<String> uidList,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -30,10 +28,9 @@ class FriendshipManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
|
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Send an friend application
|
|
||||||
/// 发送一个好友请求,需要对方调用同意申请才能成为好友。
|
/// 发送一个好友请求,需要对方调用同意申请才能成为好友。
|
||||||
/// [uid] 被邀请的用户ID
|
/// [uid] 被邀请的用户ID
|
||||||
/// [reason] 说明
|
/// [reason] 备注说明
|
||||||
Future<dynamic> addFriend({
|
Future<dynamic> addFriend({
|
||||||
required String uid,
|
required String uid,
|
||||||
String? reason,
|
String? reason,
|
||||||
@@ -47,7 +44,6 @@ class FriendshipManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Get someone's request to add me as a friend
|
|
||||||
/// 获取别人加我为好友的申请
|
/// 获取别人加我为好友的申请
|
||||||
Future<List<FriendApplicationInfo>> getRecvFriendApplicationList(
|
Future<List<FriendApplicationInfo>> getRecvFriendApplicationList(
|
||||||
{String? operationID}) =>
|
{String? operationID}) =>
|
||||||
@@ -60,7 +56,6 @@ class FriendshipManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
|
Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Get friend requests from me
|
|
||||||
/// 获取我发出的好友申请
|
/// 获取我发出的好友申请
|
||||||
Future<List<FriendApplicationInfo>> getSendFriendApplicationList(
|
Future<List<FriendApplicationInfo>> getSendFriendApplicationList(
|
||||||
{String? operationID}) =>
|
{String? operationID}) =>
|
||||||
@@ -73,8 +68,7 @@ class FriendshipManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
|
Utils.toList(value, (v) => FriendApplicationInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Find all friends including those who have been added to the blacklist
|
/// 获取好友列表,返回的列表包含了已拉入黑名单的好友
|
||||||
/// 获取好友列表包含已拉入黑名单的好友
|
|
||||||
Future<List<UserInfo>> getFriendList({String? operationID}) => _channel
|
Future<List<UserInfo>> getFriendList({String? operationID}) => _channel
|
||||||
.invokeMethod(
|
.invokeMethod(
|
||||||
'getFriendList',
|
'getFriendList',
|
||||||
@@ -83,8 +77,7 @@ class FriendshipManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
|
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Find all friends including those who have been added to the blacklist
|
/// 获取好友列表,返回的列表包含了已拉入黑名单的好友
|
||||||
/// 获取好友列表
|
|
||||||
Future<List<dynamic>> getFriendListMap({String? operationID}) => _channel
|
Future<List<dynamic>> getFriendListMap({String? operationID}) => _channel
|
||||||
.invokeMethod(
|
.invokeMethod(
|
||||||
'getFriendList',
|
'getFriendList',
|
||||||
@@ -93,7 +86,6 @@ class FriendshipManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toListMap(value));
|
.then((value) => Utils.toListMap(value));
|
||||||
|
|
||||||
/// Modify friend remark name
|
|
||||||
/// 设置好友备注
|
/// 设置好友备注
|
||||||
/// [uid] 好友的userID
|
/// [uid] 好友的userID
|
||||||
/// [remark] 好友的备注
|
/// [remark] 好友的备注
|
||||||
@@ -110,9 +102,8 @@ class FriendshipManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Add friends to blacklist
|
|
||||||
/// 加入黑名单
|
/// 加入黑名单
|
||||||
/// [uid]被加入黑名单的好友ID
|
/// [uid] 被加入黑名单的好友ID
|
||||||
Future<dynamic> addBlacklist({
|
Future<dynamic> addBlacklist({
|
||||||
required String uid,
|
required String uid,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -124,7 +115,6 @@ class FriendshipManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Find all blacklist
|
|
||||||
/// 获取黑名单列表
|
/// 获取黑名单列表
|
||||||
Future<List<UserInfo>> getBlacklist({String? operationID}) => _channel
|
Future<List<UserInfo>> getBlacklist({String? operationID}) => _channel
|
||||||
.invokeMethod(
|
.invokeMethod(
|
||||||
@@ -134,8 +124,8 @@ class FriendshipManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
|
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Remove from blacklist
|
|
||||||
/// 从黑名单移除
|
/// 从黑名单移除
|
||||||
|
/// [uid] 用户ID
|
||||||
Future<dynamic> removeBlacklist({
|
Future<dynamic> removeBlacklist({
|
||||||
required String uid,
|
required String uid,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -147,8 +137,8 @@ class FriendshipManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Determine if there is a friendship by userId
|
|
||||||
/// 检查友好关系
|
/// 检查友好关系
|
||||||
|
/// [uidList] userID列表
|
||||||
Future<List<FriendshipInfo>> checkFriend({
|
Future<List<FriendshipInfo>> checkFriend({
|
||||||
required List<String> uidList,
|
required List<String> uidList,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -163,8 +153,8 @@ class FriendshipManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (v) => FriendshipInfo.fromJson(v)));
|
Utils.toList(value, (v) => FriendshipInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Dissolve friendship from friend list
|
|
||||||
/// 删除好友
|
/// 删除好友
|
||||||
|
/// [uid] 用户ID
|
||||||
Future<dynamic> deleteFriend({
|
Future<dynamic> deleteFriend({
|
||||||
required String uid,
|
required String uid,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -176,8 +166,9 @@ class FriendshipManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Accept application of be friend
|
|
||||||
/// 接受好友请求
|
/// 接受好友请求
|
||||||
|
/// [uid] 用户ID
|
||||||
|
/// [handleMsg]备注说明
|
||||||
Future<dynamic> acceptFriendApplication({
|
Future<dynamic> acceptFriendApplication({
|
||||||
required String uid,
|
required String uid,
|
||||||
String? handleMsg,
|
String? handleMsg,
|
||||||
@@ -191,8 +182,9 @@ class FriendshipManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Refuse application of be friend
|
|
||||||
/// 拒绝好友请求
|
/// 拒绝好友请求
|
||||||
|
/// [uid] 用户ID
|
||||||
|
/// [handleMsg]备注说明
|
||||||
Future<dynamic> refuseFriendApplication({
|
Future<dynamic> refuseFriendApplication({
|
||||||
required String uid,
|
required String uid,
|
||||||
String? handleMsg,
|
String? handleMsg,
|
||||||
@@ -206,6 +198,33 @@ class FriendshipManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
/// 查好友
|
||||||
|
/// [keywordList] 搜索关键词,目前仅支持一个关键词搜索,不能为空
|
||||||
|
/// [isSearchUserID] 是否以关键词搜索好友ID(注:不可以同时为false),为空默认false
|
||||||
|
/// [isSearchNickname] 是否以关键词搜索昵称,为空默认false
|
||||||
|
/// [isSearchRemark] 是否以关键词搜索备注名,为空默认false
|
||||||
|
Future<List<FriendInfo>> searchFriends({
|
||||||
|
List<String> keywordList = const [],
|
||||||
|
bool isSearchUserID = false,
|
||||||
|
bool isSearchNickname = false,
|
||||||
|
bool isSearchRemark = false,
|
||||||
|
String? operationID,
|
||||||
|
}) =>
|
||||||
|
_channel
|
||||||
|
.invokeMethod(
|
||||||
|
'searchFriends',
|
||||||
|
_buildParam({
|
||||||
|
'searchParam': {
|
||||||
|
'keywordList': keywordList,
|
||||||
|
'isSearchUserID': isSearchUserID,
|
||||||
|
'isSearchNickname': isSearchNickname,
|
||||||
|
'isSearchRemark': isSearchRemark,
|
||||||
|
},
|
||||||
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
|
}))
|
||||||
|
.then((value) =>
|
||||||
|
Utils.toList(value, (map) => FriendInfo.fromJson(map)));
|
||||||
|
|
||||||
static Map _buildParam(Map param) {
|
static Map _buildParam(Map param) {
|
||||||
param["ManagerName"] = "friendshipManager";
|
param["ManagerName"] = "friendshipManager";
|
||||||
return param;
|
return param;
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ class GroupManager {
|
|||||||
|
|
||||||
GroupManager(this._channel);
|
GroupManager(this._channel);
|
||||||
|
|
||||||
/// Set up group relationship monitoring
|
|
||||||
/// 组关系监听
|
/// 组关系监听
|
||||||
Future setGroupListener(OnGroupListener listener) {
|
Future setGroupListener(OnGroupListener listener) {
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
return _channel.invokeMethod('setGroupListener', _buildParam({}));
|
return _channel.invokeMethod('setGroupListener', _buildParam({}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Invite friends into the group
|
|
||||||
/// 邀请进组,直接进组无需同意。
|
/// 邀请进组,直接进组无需同意。
|
||||||
|
/// [groupId] 组ID
|
||||||
|
/// [uidList] 用户ID列表
|
||||||
Future<List<GroupInviteResult>> inviteUserToGroup({
|
Future<List<GroupInviteResult>> inviteUserToGroup({
|
||||||
required String groupId,
|
required String groupId,
|
||||||
required List<String> uidList,
|
required List<String> uidList,
|
||||||
@@ -34,8 +34,10 @@ class GroupManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (map) => GroupInviteResult.fromJson(map)));
|
Utils.toList(value, (map) => GroupInviteResult.fromJson(map)));
|
||||||
|
|
||||||
/// Remove member from group
|
|
||||||
/// 移除组成员
|
/// 移除组成员
|
||||||
|
/// [groupId] 组ID
|
||||||
|
/// [uidList] 用户ID列表
|
||||||
|
/// [reason] 备注说明
|
||||||
Future<List<GroupInviteResult>> kickGroupMember({
|
Future<List<GroupInviteResult>> kickGroupMember({
|
||||||
required String groupId,
|
required String groupId,
|
||||||
required List<String> uidList,
|
required List<String> uidList,
|
||||||
@@ -54,8 +56,9 @@ class GroupManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (map) => GroupInviteResult.fromJson(map)));
|
Utils.toList(value, (map) => GroupInviteResult.fromJson(map)));
|
||||||
|
|
||||||
/// Get group member's info
|
|
||||||
/// 查询组成员资料
|
/// 查询组成员资料
|
||||||
|
/// [groupId] 组ID
|
||||||
|
/// [uidList] 用户ID列表
|
||||||
Future<List<GroupMembersInfo>> getGroupMembersInfo({
|
Future<List<GroupMembersInfo>> getGroupMembersInfo({
|
||||||
required String groupId,
|
required String groupId,
|
||||||
required List<String> uidList,
|
required List<String> uidList,
|
||||||
@@ -72,10 +75,9 @@ class GroupManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (map) => GroupMembersInfo.fromJson(map)));
|
Utils.toList(value, (map) => GroupMembersInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Get the list of group members
|
|
||||||
/// 分页获取组成员列表
|
/// 分页获取组成员列表
|
||||||
/// [groupId] 群ID
|
/// [groupId] 群ID
|
||||||
/// [filter] 过滤成员 1普通成员, 2群主,3管理员,0所有
|
/// [filter] 过滤成员 1普通成员, 2群主,3管理员,0 所有
|
||||||
/// [offset] 开始下标
|
/// [offset] 开始下标
|
||||||
/// [count] 总数
|
/// [count] 总数
|
||||||
Future<List<GroupMembersInfo>> getGroupMemberList({
|
Future<List<GroupMembersInfo>> getGroupMemberList({
|
||||||
@@ -98,7 +100,6 @@ class GroupManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (map) => GroupMembersInfo.fromJson(map)));
|
Utils.toList(value, (map) => GroupMembersInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Get the list of group members
|
|
||||||
/// 分页获取组成员列表
|
/// 分页获取组成员列表
|
||||||
/// [groupId] 群ID
|
/// [groupId] 群ID
|
||||||
/// [filter] 过滤成员 1普通成员, 2群主,3管理员,0所有
|
/// [filter] 过滤成员 1普通成员, 2群主,3管理员,0所有
|
||||||
@@ -123,7 +124,6 @@ class GroupManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toListMap(value));
|
.then((value) => Utils.toListMap(value));
|
||||||
|
|
||||||
/// Find all groups you have joined
|
|
||||||
/// 查询已加入的组列表
|
/// 查询已加入的组列表
|
||||||
Future<List<GroupInfo>> getJoinedGroupList({String? operationID}) => _channel
|
Future<List<GroupInfo>> getJoinedGroupList({String? operationID}) => _channel
|
||||||
.invokeMethod(
|
.invokeMethod(
|
||||||
@@ -133,7 +133,6 @@ class GroupManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toList(value, (map) => GroupInfo.fromJson(map)));
|
.then((value) => Utils.toList(value, (map) => GroupInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Find all groups you have joined
|
|
||||||
/// 查询已加入的组列表
|
/// 查询已加入的组列表
|
||||||
Future<List<dynamic>> getJoinedGroupListMap({String? operationID}) => _channel
|
Future<List<dynamic>> getJoinedGroupListMap({String? operationID}) => _channel
|
||||||
.invokeMethod(
|
.invokeMethod(
|
||||||
@@ -143,8 +142,8 @@ class GroupManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toListMap(value));
|
.then((value) => Utils.toListMap(value));
|
||||||
|
|
||||||
/// Check if you are a member of the group
|
|
||||||
/// 检查是否已加入组
|
/// 检查是否已加入组
|
||||||
|
/// [gid] 组ID
|
||||||
Future<bool> isJoinedGroup({
|
Future<bool> isJoinedGroup({
|
||||||
required String gid,
|
required String gid,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -153,14 +152,14 @@ class GroupManager {
|
|||||||
operationID: Utils.checkOperationID(operationID),
|
operationID: Utils.checkOperationID(operationID),
|
||||||
).then((list) => list.where((e) => e.groupID == gid).length > 0);
|
).then((list) => list.where((e) => e.groupID == gid).length > 0);
|
||||||
|
|
||||||
/// Create a group
|
|
||||||
/// 创建一个组
|
/// 创建一个组
|
||||||
/// [groupName] 群名
|
/// [groupName] 群名
|
||||||
/// [notification] 公告
|
/// [notification] 公告
|
||||||
/// [introduction] 群介绍
|
/// [introduction] 群介绍
|
||||||
/// [faceUrl] 群头像
|
/// [faceUrl] 群头像
|
||||||
|
/// [groupType] 组类型
|
||||||
/// [ex] 额外信息
|
/// [ex] 额外信息
|
||||||
/// [list] 初创群成员以及其角色
|
/// [list] 初创群成员以及其角色列表,角色参考[GroupRoleLevel]类
|
||||||
Future<GroupInfo> createGroup({
|
Future<GroupInfo> createGroup({
|
||||||
String? groupName,
|
String? groupName,
|
||||||
String? notification,
|
String? notification,
|
||||||
@@ -189,7 +188,6 @@ class GroupManager {
|
|||||||
.then(
|
.then(
|
||||||
(value) => Utils.toObj(value, (map) => GroupInfo.fromJson(map)));
|
(value) => Utils.toObj(value, (map) => GroupInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Edit group information
|
|
||||||
/// 编辑组资料
|
/// 编辑组资料
|
||||||
/// [groupID] 被编辑的群ID
|
/// [groupID] 被编辑的群ID
|
||||||
/// [groupName] 新的群名
|
/// [groupName] 新的群名
|
||||||
@@ -221,8 +219,8 @@ class GroupManager {
|
|||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Find group information by group id
|
|
||||||
/// 查询组信息
|
/// 查询组信息
|
||||||
|
/// [gidList] 组ID列表
|
||||||
Future<List<GroupInfo>> getGroupsInfo({
|
Future<List<GroupInfo>> getGroupsInfo({
|
||||||
required List<String> gidList,
|
required List<String> gidList,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -237,7 +235,6 @@ class GroupManager {
|
|||||||
.then(
|
.then(
|
||||||
(value) => Utils.toList(value, (map) => GroupInfo.fromJson(map)));
|
(value) => Utils.toList(value, (map) => GroupInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Apply to join the group
|
|
||||||
/// 申请加入组,需要通过管理员/群组同意。
|
/// 申请加入组,需要通过管理员/群组同意。
|
||||||
Future<dynamic> joinGroup({
|
Future<dynamic> joinGroup({
|
||||||
required String gid,
|
required String gid,
|
||||||
@@ -252,7 +249,6 @@ class GroupManager {
|
|||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Leave group
|
|
||||||
/// 退出组
|
/// 退出组
|
||||||
Future<dynamic> quitGroup({
|
Future<dynamic> quitGroup({
|
||||||
required String gid,
|
required String gid,
|
||||||
@@ -265,8 +261,9 @@ class GroupManager {
|
|||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Give group permissions to others
|
|
||||||
/// 转移组拥有者权限
|
/// 转移组拥有者权限
|
||||||
|
/// [gid] 组ID
|
||||||
|
/// [uid] 新拥有者ID
|
||||||
Future<dynamic> transferGroupOwner({
|
Future<dynamic> transferGroupOwner({
|
||||||
required String gid,
|
required String gid,
|
||||||
required String uid,
|
required String uid,
|
||||||
@@ -280,7 +277,6 @@ class GroupManager {
|
|||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// As the group owner or administrator, the group member's application to join the group received
|
|
||||||
/// 作为群主或者管理员,收到的群成员入群申请
|
/// 作为群主或者管理员,收到的群成员入群申请
|
||||||
Future<List<GroupApplicationInfo>> getRecvGroupApplicationList(
|
Future<List<GroupApplicationInfo>> getRecvGroupApplicationList(
|
||||||
{String? operationID}) =>
|
{String? operationID}) =>
|
||||||
@@ -293,7 +289,6 @@ class GroupManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map)));
|
Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Get the record of the group membership application issued by yourself
|
|
||||||
/// 获取自己发出的入群申请记录
|
/// 获取自己发出的入群申请记录
|
||||||
Future<List<GroupApplicationInfo>> getSendGroupApplicationList(
|
Future<List<GroupApplicationInfo>> getSendGroupApplicationList(
|
||||||
{String? operationID}) =>
|
{String? operationID}) =>
|
||||||
@@ -306,9 +301,10 @@ class GroupManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map)));
|
Utils.toList(value, (map) => GroupApplicationInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Accept group application
|
|
||||||
/// 管理员或者群主同意某人进入某群
|
/// 管理员或者群主同意某人进入某群
|
||||||
/// 注:主动申请入群需要通过管理员/群组处理,被别人拉入群不需要管理员/群组处理
|
/// 注:主动申请入群需要通过管理员/群组处理,被别人拉入群不需要管理员/群组处理
|
||||||
|
/// [gid] 组id
|
||||||
|
/// [uid] 申请者用户ID
|
||||||
Future<dynamic> acceptGroupApplication({
|
Future<dynamic> acceptGroupApplication({
|
||||||
required String gid,
|
required String gid,
|
||||||
required String uid,
|
required String uid,
|
||||||
@@ -324,9 +320,11 @@ class GroupManager {
|
|||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Refuse group application
|
|
||||||
/// 管理员或者群主拒绝某人进入某群
|
/// 管理员或者群主拒绝某人进入某群
|
||||||
/// 注:主动申请入群需要通过管理员/群组处理,被别人拉入群不需要管理员/群组处理
|
/// 注:主动申请入群需要通过管理员/群组处理,被别人拉入群不需要管理员/群组处理
|
||||||
|
/// [gid] 组id
|
||||||
|
/// [uid] 申请者用户ID
|
||||||
|
/// [handleMsg] 说明
|
||||||
Future<dynamic> refuseGroupApplication({
|
Future<dynamic> refuseGroupApplication({
|
||||||
required String gid,
|
required String gid,
|
||||||
required String uid,
|
required String uid,
|
||||||
@@ -342,8 +340,8 @@ class GroupManager {
|
|||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Dissmiss group
|
|
||||||
/// 解散群
|
/// 解散群
|
||||||
|
/// [groupID] 群ID
|
||||||
Future<dynamic> dismissGroup({
|
Future<dynamic> dismissGroup({
|
||||||
required String groupID,
|
required String groupID,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -355,7 +353,6 @@ class GroupManager {
|
|||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Enable group mute
|
|
||||||
/// 开启群禁言,所有群成员禁止发言
|
/// 开启群禁言,所有群成员禁止发言
|
||||||
/// [groupID] 将开启群禁言的组ID
|
/// [groupID] 将开启群禁言的组ID
|
||||||
/// [mute] true:开启,false:关闭
|
/// [mute] true:开启,false:关闭
|
||||||
@@ -372,11 +369,10 @@ class GroupManager {
|
|||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Mute group members
|
|
||||||
/// 禁言群成员
|
/// 禁言群成员
|
||||||
/// [groupID] 群ID
|
/// [groupID] 群ID
|
||||||
/// [userID] 将被禁言的成员ID
|
/// [userID] 将被禁言的成员ID
|
||||||
/// [seconds] 被禁言的时间s,设置为0则为接触禁言
|
/// [seconds] 被禁言的时间s,设置为0则为解除禁言
|
||||||
Future<dynamic> changeGroupMemberMute({
|
Future<dynamic> changeGroupMemberMute({
|
||||||
required String groupID,
|
required String groupID,
|
||||||
required String userID,
|
required String userID,
|
||||||
@@ -392,7 +388,6 @@ class GroupManager {
|
|||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Set group user nickname
|
|
||||||
/// 设置群成员昵称
|
/// 设置群成员昵称
|
||||||
/// [groupID] 群ID
|
/// [groupID] 群ID
|
||||||
/// [userID] 群成员的用户ID
|
/// [userID] 群成员的用户ID
|
||||||
@@ -412,7 +407,6 @@ class GroupManager {
|
|||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Search group
|
|
||||||
/// 查询群
|
/// 查询群
|
||||||
/// [keywordList] 搜索关键词,目前仅支持一个关键词搜索,不能为空
|
/// [keywordList] 搜索关键词,目前仅支持一个关键词搜索,不能为空
|
||||||
/// [isSearchGroupID] 是否以关键词搜索群ID(注:两个不可以同时为false),为空默认false
|
/// [isSearchGroupID] 是否以关键词搜索群ID(注:两个不可以同时为false),为空默认false
|
||||||
@@ -437,6 +431,72 @@ class GroupManager {
|
|||||||
.then(
|
.then(
|
||||||
(value) => Utils.toList(value, (map) => GroupInfo.fromJson(map)));
|
(value) => Utils.toList(value, (map) => GroupInfo.fromJson(map)));
|
||||||
|
|
||||||
|
/// 设置群成员权限
|
||||||
|
/// [groupID] 群ID
|
||||||
|
/// [userID] 群成员的用户ID
|
||||||
|
/// [roleLevel] 角色等级,参考[GroupRoleLevel]
|
||||||
|
Future<dynamic> setGroupMemberRoleLevel({
|
||||||
|
required String groupID,
|
||||||
|
required String userID,
|
||||||
|
required int roleLevel,
|
||||||
|
String? operationID,
|
||||||
|
}) =>
|
||||||
|
_channel.invokeMethod(
|
||||||
|
'setGroupMemberRoleLevel',
|
||||||
|
_buildParam({
|
||||||
|
'groupID': groupID,
|
||||||
|
'userID': userID,
|
||||||
|
'roleLevel': roleLevel,
|
||||||
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
|
}));
|
||||||
|
|
||||||
|
/// 根据加入时间分页获取组成员列表
|
||||||
|
/// [groupID] 群ID
|
||||||
|
/// [joinTimeBegin] 加入开始时间
|
||||||
|
/// [joinTimeEnd] 加入结束时间
|
||||||
|
/// [offset] 开始下标
|
||||||
|
/// [count] 总数
|
||||||
|
/// [excludeUserIDList] 排除的用户
|
||||||
|
Future<List<GroupMembersInfo>> getGroupMemberListByJoinTime({
|
||||||
|
required String groupID,
|
||||||
|
int offset = 0,
|
||||||
|
int count = 0,
|
||||||
|
int joinTimeBegin = 0,
|
||||||
|
int joinTimeEnd = 0,
|
||||||
|
List<String> excludeUserIDList = const [],
|
||||||
|
String? operationID,
|
||||||
|
}) =>
|
||||||
|
_channel
|
||||||
|
.invokeMethod(
|
||||||
|
'getGroupMemberListByJoinTimeFilter',
|
||||||
|
_buildParam({
|
||||||
|
'groupID': groupID,
|
||||||
|
'offset': offset,
|
||||||
|
'count': count,
|
||||||
|
'joinTimeBegin': joinTimeBegin,
|
||||||
|
'joinTimeEnd': joinTimeEnd,
|
||||||
|
'excludeUserIDList': excludeUserIDList,
|
||||||
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
|
}))
|
||||||
|
.then((value) =>
|
||||||
|
Utils.toList(value, (map) => GroupMembersInfo.fromJson(map)));
|
||||||
|
|
||||||
|
/// 设置群成员权限
|
||||||
|
/// [groupID] 群ID
|
||||||
|
/// [needVerification] 进群设置,参考[GroupVerification]类
|
||||||
|
Future<dynamic> setGroupVerification({
|
||||||
|
required String groupID,
|
||||||
|
required int needVerification,
|
||||||
|
String? operationID,
|
||||||
|
}) =>
|
||||||
|
_channel.invokeMethod(
|
||||||
|
'setGroupVerification',
|
||||||
|
_buildParam({
|
||||||
|
'groupID': groupID,
|
||||||
|
'needVerification': needVerification,
|
||||||
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
|
}));
|
||||||
|
|
||||||
static Map _buildParam(Map param) {
|
static Map _buildParam(Map param) {
|
||||||
param["ManagerName"] = "groupManager";
|
param["ManagerName"] = "groupManager";
|
||||||
return param;
|
return param;
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ class IMManager {
|
|||||||
}
|
}
|
||||||
} else if (call.method == ListenerType.advancedMsgListener) {
|
} else if (call.method == ListenerType.advancedMsgListener) {
|
||||||
var type = call.arguments['type'];
|
var type = call.arguments['type'];
|
||||||
var id = call.arguments['data']['id'];
|
// var id = call.arguments['data']['id'];
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'onRecvNewMessage':
|
case 'onRecvNewMessage':
|
||||||
var value = call.arguments['data']['newMessage'];
|
var value = call.arguments['data']['newMessage'];
|
||||||
@@ -289,23 +289,13 @@ class IMManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initialize SDK
|
|
||||||
///
|
|
||||||
/// [platform] platform number [IMPlatform]
|
|
||||||
/// [apiAddr] api server ip address
|
|
||||||
/// [wsAddr] webSocket ip address
|
|
||||||
/// [dataDir] data storage directory
|
|
||||||
/// [objectStorage] storage object: cos/minio
|
|
||||||
/// [logLevel] log level: 1-not print
|
|
||||||
///
|
|
||||||
/// 初始化SDK
|
/// 初始化SDK
|
||||||
///
|
|
||||||
/// [platform] 平台编号[IMPlatform]
|
/// [platform] 平台编号[IMPlatform]
|
||||||
/// [apiAddr] SDK api地址
|
/// [apiAddr] SDK api地址
|
||||||
/// [wsAddr] SDK websocket地址
|
/// [wsAddr] SDK websocket地址
|
||||||
/// [dataDir] SDK数据库存储目录
|
/// [dataDir] SDK数据库存储目录
|
||||||
/// [objectStorage] 存储对象 cos/minio
|
/// [objectStorage] 存储对象 cos/minio
|
||||||
/// [logLevel] 日志 1-不打印
|
/// [logLevel] 日志 1不打印
|
||||||
Future<dynamic> initSDK({
|
Future<dynamic> initSDK({
|
||||||
required int platform,
|
required int platform,
|
||||||
required String apiAddr,
|
required String apiAddr,
|
||||||
@@ -333,15 +323,14 @@ class IMManager {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@deprecated
|
/// 反初始化SDK
|
||||||
Future<dynamic> unInitSDK() {
|
Future<dynamic> unInitSDK() {
|
||||||
return _channel.invokeMethod('unInitSDK', _buildParam({}));
|
return _channel.invokeMethod('unInitSDK', _buildParam({}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Login sdk
|
|
||||||
/// 登录
|
/// 登录
|
||||||
/// [uid]用户id
|
/// [uid] 用户id
|
||||||
/// [token]登录token,从业务服务器上获取
|
/// [token] 登录token,从业务服务器上获取
|
||||||
Future<UserInfo> login({
|
Future<UserInfo> login({
|
||||||
required String uid,
|
required String uid,
|
||||||
required String token,
|
required String token,
|
||||||
@@ -362,7 +351,6 @@ class IMManager {
|
|||||||
return uInfo;
|
return uInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Logout sdk
|
|
||||||
/// 登出
|
/// 登出
|
||||||
Future<dynamic> logout({String? operationID}) async {
|
Future<dynamic> logout({String? operationID}) async {
|
||||||
var value = await _channel.invokeMethod(
|
var value = await _channel.invokeMethod(
|
||||||
@@ -375,19 +363,16 @@ class IMManager {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
/// 获取登录状态
|
||||||
Future<int?> getLoginStatus() =>
|
Future<int?> getLoginStatus() =>
|
||||||
_channel.invokeMethod<int>('getLoginStatus', _buildParam({}));
|
_channel.invokeMethod<int>('getLoginStatus', _buildParam({}));
|
||||||
|
|
||||||
/// Current user id
|
|
||||||
/// 获取当前登录用户id
|
/// 获取当前登录用户id
|
||||||
Future<String> getLoginUserID() async => uid;
|
Future<String> getLoginUserID() async => uid;
|
||||||
|
|
||||||
/// Current user info
|
|
||||||
/// 获取当前登录用户信息
|
/// 获取当前登录用户信息
|
||||||
Future<UserInfo> getLoginUserInfo() async => uInfo;
|
Future<UserInfo> getLoginUserInfo() async => uInfo;
|
||||||
|
|
||||||
/// wakeup
|
|
||||||
/// 从后台回到前台立刻唤醒
|
/// 从后台回到前台立刻唤醒
|
||||||
Future wakeUp({String? operationID}) => _channel.invokeMethod(
|
Future wakeUp({String? operationID}) => _channel.invokeMethod(
|
||||||
'wakeUp',
|
'wakeUp',
|
||||||
@@ -395,9 +380,8 @@ class IMManager {
|
|||||||
'operationID': Utils.checkOperationID(operationID),
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// upload image to server
|
|
||||||
/// 上传图片到服务器
|
/// 上传图片到服务器
|
||||||
/// [path]图片路径
|
/// [path] 图片路径
|
||||||
/// [token] im token
|
/// [token] im token
|
||||||
/// [objectStorage] 存储对象 cos/minio
|
/// [objectStorage] 存储对象 cos/minio
|
||||||
Future uploadImage({
|
Future uploadImage({
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ class MessageManager {
|
|||||||
|
|
||||||
MessageManager(this._channel);
|
MessageManager(this._channel);
|
||||||
|
|
||||||
/// Set a message listener
|
|
||||||
/// 消息监听
|
/// 消息监听
|
||||||
Future setAdvancedMsgListener(OnAdvancedMsgListener listener) {
|
Future setAdvancedMsgListener(OnAdvancedMsgListener listener) {
|
||||||
this.msgListener = listener;
|
this.msgListener = listener;
|
||||||
@@ -22,18 +21,16 @@ class MessageManager {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set up message sending progress monitoring
|
|
||||||
/// 消息发送进度监听
|
/// 消息发送进度监听
|
||||||
void setMsgSendProgressListener(OnMsgSendProgressListener listener) {
|
void setMsgSendProgressListener(OnMsgSendProgressListener listener) {
|
||||||
msgSendProgressListener = listener;
|
msgSendProgressListener = listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Send a message to user or to group
|
|
||||||
/// [userID] receiver's user ID
|
|
||||||
/// 发送消息
|
/// 发送消息
|
||||||
/// [userID]接收消息的用户id
|
/// [message] 消息体
|
||||||
/// [groupID]接收消息的组id
|
/// [userID] 接收消息的用户id
|
||||||
/// [offlinePushInfo]离线消息显示内容
|
/// [groupID] 接收消息的组id
|
||||||
|
/// [offlinePushInfo] 离线消息显示内容
|
||||||
Future<Message> sendMessage({
|
Future<Message> sendMessage({
|
||||||
required Message message,
|
required Message message,
|
||||||
required OfflinePushInfo offlinePushInfo,
|
required OfflinePushInfo offlinePushInfo,
|
||||||
@@ -53,7 +50,6 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Find all history message
|
|
||||||
/// 获取聊天记录(以startMsg为节点,以前的聊天记录)
|
/// 获取聊天记录(以startMsg为节点,以前的聊天记录)
|
||||||
/// [userID] 接收消息的用户id
|
/// [userID] 接收消息的用户id
|
||||||
/// [conversationID] 会话id,查询通知时可用
|
/// [conversationID] 会话id,查询通知时可用
|
||||||
@@ -81,8 +77,8 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toList(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toList(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Revoke the sent information
|
|
||||||
/// 撤回消息
|
/// 撤回消息
|
||||||
|
/// [message] 被撤回的消息体
|
||||||
Future revokeMessage({
|
Future revokeMessage({
|
||||||
required Message message,
|
required Message message,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -94,8 +90,8 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
})));
|
})));
|
||||||
|
|
||||||
/// Delete message
|
|
||||||
/// 删除本地消息
|
/// 删除本地消息
|
||||||
|
/// [message] 被删除的消息体
|
||||||
Future deleteMessageFromLocalStorage({
|
Future deleteMessageFromLocalStorage({
|
||||||
required Message message,
|
required Message message,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -107,12 +103,10 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
})));
|
})));
|
||||||
|
|
||||||
///
|
|
||||||
// Future deleteMessages({required List<Message> msgList}) =>
|
|
||||||
// _channel.invokeMethod('deleteMessages',
|
|
||||||
// _buildParam({"msgList": msgList.map((e) => e.toJson()).toList()}));
|
|
||||||
|
|
||||||
/// 插入单聊消息到本地
|
/// 插入单聊消息到本地
|
||||||
|
/// [receiverID] 接收者id
|
||||||
|
/// [senderID] 发送者id
|
||||||
|
/// [message] 消息体
|
||||||
Future<Message> insertSingleMessageToLocalStorage({
|
Future<Message> insertSingleMessageToLocalStorage({
|
||||||
String? receiverID,
|
String? receiverID,
|
||||||
String? senderID,
|
String? senderID,
|
||||||
@@ -131,6 +125,9 @@ class MessageManager {
|
|||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// 插入群聊消息到本地
|
/// 插入群聊消息到本地
|
||||||
|
/// [groupID] 群id
|
||||||
|
/// [senderID] 发送者id
|
||||||
|
/// [message] 消息体
|
||||||
Future<Message> insertGroupMessageToLocalStorage({
|
Future<Message> insertGroupMessageToLocalStorage({
|
||||||
String? groupID,
|
String? groupID,
|
||||||
String? senderID,
|
String? senderID,
|
||||||
@@ -148,8 +145,9 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Mark c2c message as read
|
/// 标记c2c单条消息已读
|
||||||
/// 标记c2c消息已读
|
/// [userID] 消息来源的userID
|
||||||
|
/// [messageIDList] 消息clientMsgID集合
|
||||||
Future markC2CMessageAsRead({
|
Future markC2CMessageAsRead({
|
||||||
required String userID,
|
required String userID,
|
||||||
required List<String> messageIDList,
|
required List<String> messageIDList,
|
||||||
@@ -163,8 +161,9 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Mark group message as read
|
|
||||||
/// 标记群聊消息已读
|
/// 标记群聊消息已读
|
||||||
|
/// [groupID] 群id
|
||||||
|
/// [messageIDList] 消息clientMsgID集合
|
||||||
Future markGroupMessageAsRead({
|
Future markGroupMessageAsRead({
|
||||||
required String groupID,
|
required String groupID,
|
||||||
required List<String> messageIDList,
|
required List<String> messageIDList,
|
||||||
@@ -178,7 +177,6 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Typing
|
|
||||||
/// 正在输入提示
|
/// 正在输入提示
|
||||||
/// [msgTip] 自定义内容
|
/// [msgTip] 自定义内容
|
||||||
Future typingStatusUpdate({
|
Future typingStatusUpdate({
|
||||||
@@ -194,7 +192,6 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Create text message
|
|
||||||
/// 创建文本消息
|
/// 创建文本消息
|
||||||
Future<Message> createTextMessage({
|
Future<Message> createTextMessage({
|
||||||
required String text,
|
required String text,
|
||||||
@@ -209,7 +206,6 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create @ message
|
|
||||||
/// 创建@消息
|
/// 创建@消息
|
||||||
/// [text] 输入内容
|
/// [text] 输入内容
|
||||||
/// [atUserIDList] 被@到的userID集合
|
/// [atUserIDList] 被@到的userID集合
|
||||||
@@ -235,8 +231,8 @@ class MessageManager {
|
|||||||
)
|
)
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create picture message
|
|
||||||
/// 创建图片消息
|
/// 创建图片消息
|
||||||
|
/// [imagePath] 路径
|
||||||
Future<Message> createImageMessage({
|
Future<Message> createImageMessage({
|
||||||
required String imagePath,
|
required String imagePath,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -251,7 +247,6 @@ class MessageManager {
|
|||||||
)
|
)
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create picture message
|
|
||||||
/// 创建图片消息
|
/// 创建图片消息
|
||||||
/// [imagePath] 路径
|
/// [imagePath] 路径
|
||||||
Future<Message> createImageMessageFromFullPath({
|
Future<Message> createImageMessageFromFullPath({
|
||||||
@@ -268,8 +263,9 @@ class MessageManager {
|
|||||||
)
|
)
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create sound message
|
|
||||||
/// 创建语音消息
|
/// 创建语音消息
|
||||||
|
/// [soundPath] 路径
|
||||||
|
/// [duration] 时长s
|
||||||
Future<Message> createSoundMessage({
|
Future<Message> createSoundMessage({
|
||||||
required String soundPath,
|
required String soundPath,
|
||||||
required int duration,
|
required int duration,
|
||||||
@@ -286,7 +282,6 @@ class MessageManager {
|
|||||||
)
|
)
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create sound message
|
|
||||||
/// 创建语音消息
|
/// 创建语音消息
|
||||||
/// [soundPath] 路径
|
/// [soundPath] 路径
|
||||||
/// [duration] 时长s
|
/// [duration] 时长s
|
||||||
@@ -306,8 +301,11 @@ class MessageManager {
|
|||||||
)
|
)
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create video message
|
|
||||||
/// 创建视频消息
|
/// 创建视频消息
|
||||||
|
/// [videoPath] 路径
|
||||||
|
/// [videoType] 视频mime类型
|
||||||
|
/// [duration] 时长s
|
||||||
|
/// [snapshotPath] 默认站位图路径
|
||||||
Future<Message> createVideoMessage({
|
Future<Message> createVideoMessage({
|
||||||
required String videoPath,
|
required String videoPath,
|
||||||
required String videoType,
|
required String videoType,
|
||||||
@@ -327,7 +325,6 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create video message
|
|
||||||
/// 创建视频消息
|
/// 创建视频消息
|
||||||
/// [videoPath] 路径
|
/// [videoPath] 路径
|
||||||
/// [videoType] 视频mime类型
|
/// [videoType] 视频mime类型
|
||||||
@@ -352,8 +349,9 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create file message
|
|
||||||
/// 创建文件消息
|
/// 创建文件消息
|
||||||
|
/// [filePath] 路径
|
||||||
|
/// [fileName] 文件名
|
||||||
Future<Message> createFileMessage({
|
Future<Message> createFileMessage({
|
||||||
required String filePath,
|
required String filePath,
|
||||||
required String fileName,
|
required String fileName,
|
||||||
@@ -370,7 +368,6 @@ class MessageManager {
|
|||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create file message
|
|
||||||
/// 创建文件消息
|
/// 创建文件消息
|
||||||
/// [filePath] 路径
|
/// [filePath] 路径
|
||||||
/// [fileName] 文件名
|
/// [fileName] 文件名
|
||||||
@@ -389,7 +386,6 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create merger message
|
|
||||||
/// 创建合并消息
|
/// 创建合并消息
|
||||||
/// [messageList] 被选中的消息
|
/// [messageList] 被选中的消息
|
||||||
/// [title] 摘要标题
|
/// [title] 摘要标题
|
||||||
@@ -411,7 +407,6 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create forward message
|
|
||||||
/// 创建转发消息
|
/// 创建转发消息
|
||||||
/// [message] 被转发的消息
|
/// [message] 被转发的消息
|
||||||
Future<Message> createForwardMessage({
|
Future<Message> createForwardMessage({
|
||||||
@@ -428,7 +423,6 @@ class MessageManager {
|
|||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create location message
|
|
||||||
/// 创建位置消息
|
/// 创建位置消息
|
||||||
/// [latitude] 纬度
|
/// [latitude] 纬度
|
||||||
/// [longitude] 经度
|
/// [longitude] 经度
|
||||||
@@ -450,8 +444,10 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create custom message
|
|
||||||
/// 创建自定义消息
|
/// 创建自定义消息
|
||||||
|
/// [data] 自定义数据
|
||||||
|
/// [extension] 自定义扩展内容
|
||||||
|
/// [description] 自定义描述内容
|
||||||
Future<Message> createCustomMessage({
|
Future<Message> createCustomMessage({
|
||||||
required String data,
|
required String data,
|
||||||
required String extension,
|
required String extension,
|
||||||
@@ -469,7 +465,6 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create quote message
|
|
||||||
/// 创建引用消息
|
/// 创建引用消息
|
||||||
/// [text] 回复的内容
|
/// [text] 回复的内容
|
||||||
/// [quoteMsg] 被回复的消息
|
/// [quoteMsg] 被回复的消息
|
||||||
@@ -488,8 +483,8 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create card message
|
|
||||||
/// 创建卡片消息
|
/// 创建卡片消息
|
||||||
|
/// [data] 自定义数据
|
||||||
Future<Message> createCardMessage({
|
Future<Message> createCardMessage({
|
||||||
required Map<String, dynamic> data,
|
required Map<String, dynamic> data,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -503,9 +498,6 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Create custom emoji message
|
|
||||||
/// [index] The position of the emoji, such as the position emoji
|
|
||||||
/// [data] Other data, such as url expressions
|
|
||||||
/// 创建自定义表情消息
|
/// 创建自定义表情消息
|
||||||
/// [index] 位置表情,根据index匹配
|
/// [index] 位置表情,根据index匹配
|
||||||
/// [data] url表情,直接使用url显示
|
/// [data] url表情,直接使用url显示
|
||||||
@@ -524,8 +516,8 @@ class MessageManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => Message.fromJson(map)));
|
||||||
|
|
||||||
/// Clear all c2c history message
|
|
||||||
/// 清空单聊消息记录
|
/// 清空单聊消息记录
|
||||||
|
/// [uid] 单聊对象id
|
||||||
Future<dynamic> clearC2CHistoryMessage({
|
Future<dynamic> clearC2CHistoryMessage({
|
||||||
required String uid,
|
required String uid,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -537,8 +529,8 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Clear all group history
|
|
||||||
/// 清空组消息记录
|
/// 清空组消息记录
|
||||||
|
/// [gid] 组id
|
||||||
Future<dynamic> clearGroupHistoryMessage({
|
Future<dynamic> clearGroupHistoryMessage({
|
||||||
required String gid,
|
required String gid,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -550,17 +542,16 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Search local message
|
|
||||||
/// 搜索消息
|
/// 搜索消息
|
||||||
/// [conversationID] 根据会话查询,如果是全局搜索传null
|
/// [conversationID] 根据会话查询,如果是全局搜索传null
|
||||||
/// [keywordList]搜索关键词列表,目前仅支持一个关键词搜索
|
/// [keywordList] 搜索关键词列表,目前仅支持一个关键词搜索
|
||||||
/// [keywordListMatchType]关键词匹配模式,1代表与,2代表或,暂时未用
|
/// [keywordListMatchType] 关键词匹配模式,1代表与,2代表或,暂时未用
|
||||||
/// [senderUserIDList]指定消息发送的uid列表 暂时未用
|
/// [senderUserIDList] 指定消息发送的uid列表 暂时未用
|
||||||
/// [messageTypeList]消息类型列表
|
/// [messageTypeList] 消息类型列表
|
||||||
/// [searchTimePosition]搜索的起始时间点。默认为0即代表从现在开始搜索。UTC 时间戳,单位:秒
|
/// [searchTimePosition] 搜索的起始时间点。默认为0即代表从现在开始搜索。UTC 时间戳,单位:秒
|
||||||
/// [searchTimePeriod]从起始时间点开始的过去时间范围,单位秒。默认为0即代表不限制时间范围,传24x60x60代表过去一天
|
/// [searchTimePeriod] 从起始时间点开始的过去时间范围,单位秒。默认为0即代表不限制时间范围,传24x60x60代表过去一天
|
||||||
/// [pageIndex]当前页数
|
/// [pageIndex] 当前页数
|
||||||
/// [count]每页数量
|
/// [count] 每页数量
|
||||||
Future<SearchResult> searchLocalMessages({
|
Future<SearchResult> searchLocalMessages({
|
||||||
String? conversationID,
|
String? conversationID,
|
||||||
List<String> keywordList = const [],
|
List<String> keywordList = const [],
|
||||||
@@ -593,8 +584,8 @@ class MessageManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toObj(value, (map) => SearchResult.fromJson(map)));
|
Utils.toObj(value, (map) => SearchResult.fromJson(map)));
|
||||||
|
|
||||||
/// Delete message from local and service
|
|
||||||
/// 删除本地跟服务器的指定的消息
|
/// 删除本地跟服务器的指定的消息
|
||||||
|
/// [message] 被删除的消息
|
||||||
Future<dynamic> deleteMessageFromLocalAndSvr({
|
Future<dynamic> deleteMessageFromLocalAndSvr({
|
||||||
required Message message,
|
required Message message,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -606,7 +597,6 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
})));
|
})));
|
||||||
|
|
||||||
/// Delete all message from local
|
|
||||||
/// 删除本地所有聊天记录
|
/// 删除本地所有聊天记录
|
||||||
Future<dynamic> deleteAllMsgFromLocal({
|
Future<dynamic> deleteAllMsgFromLocal({
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -617,7 +607,6 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Delete all message from service
|
|
||||||
/// 删除本地跟服务器所有聊天记录
|
/// 删除本地跟服务器所有聊天记录
|
||||||
Future<dynamic> deleteAllMsgFromLocalAndSvr({
|
Future<dynamic> deleteAllMsgFromLocalAndSvr({
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -628,7 +617,6 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Mark conversation message as read
|
|
||||||
/// 标记消息已读
|
/// 标记消息已读
|
||||||
/// [conversationID] 会话ID
|
/// [conversationID] 会话ID
|
||||||
/// [messageIDList] 被标记的消息clientMsgID
|
/// [messageIDList] 被标记的消息clientMsgID
|
||||||
@@ -645,8 +633,8 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Clear all c2c history message
|
|
||||||
/// 删除本地跟服务器的单聊聊天记录
|
/// 删除本地跟服务器的单聊聊天记录
|
||||||
|
/// [uid] 聊天对象的userID
|
||||||
Future<dynamic> clearC2CHistoryMessageFromLocalAndSvr({
|
Future<dynamic> clearC2CHistoryMessageFromLocalAndSvr({
|
||||||
required String uid,
|
required String uid,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -658,8 +646,8 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Clear all group history
|
|
||||||
/// 删除本地跟服务器的群聊天记录
|
/// 删除本地跟服务器的群聊天记录
|
||||||
|
/// [gid] 组id
|
||||||
Future<dynamic> clearGroupHistoryMessageFromLocalAndSvr({
|
Future<dynamic> clearGroupHistoryMessageFromLocalAndSvr({
|
||||||
required String gid,
|
required String gid,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -671,7 +659,6 @@ class MessageManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/// Find all history message
|
|
||||||
/// 获取聊天记录(以startMsg为节点,新收到的聊天记录),用在全局搜索定位某一条消息,然后此条消息后新增的消息
|
/// 获取聊天记录(以startMsg为节点,新收到的聊天记录),用在全局搜索定位某一条消息,然后此条消息后新增的消息
|
||||||
/// [userID] 接收消息的用户id
|
/// [userID] 接收消息的用户id
|
||||||
/// [conversationID] 会话id,查询通知时可用
|
/// [conversationID] 会话id,查询通知时可用
|
||||||
|
|||||||
@@ -7,15 +7,16 @@ class OrganizationManager {
|
|||||||
|
|
||||||
OrganizationManager(this._channel);
|
OrganizationManager(this._channel);
|
||||||
|
|
||||||
/// Observe organization info changes
|
|
||||||
/// 组织架构发生变化回调
|
/// 组织架构发生变化回调
|
||||||
Future setOrganizationListener(OnOrganizationListener listener) {
|
Future setOrganizationListener(OnOrganizationListener listener) {
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
return _channel.invokeMethod('setOrganizationListener', _buildParam({}));
|
return _channel.invokeMethod('setOrganizationListener', _buildParam({}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Query sub department
|
/// 获取子部门列表,返回当前部门下的一级子部门
|
||||||
/// 获取子部门列表
|
/// [departmentID] 当前部门id
|
||||||
|
/// [offset] 开始下标
|
||||||
|
/// [count] 每页大小
|
||||||
Future<List<DeptInfo>> getSubDept({
|
Future<List<DeptInfo>> getSubDept({
|
||||||
required String departmentID,
|
required String departmentID,
|
||||||
int offset = 0,
|
int offset = 0,
|
||||||
@@ -33,8 +34,10 @@ class OrganizationManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toList(value, (v) => DeptInfo.fromJson(v)));
|
.then((value) => Utils.toList(value, (v) => DeptInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Get member under a department
|
/// 获取部门下的成员列表,返回当前部门下的一级成员
|
||||||
/// 获取部门下的成员列表
|
/// [departmentID] 当前部门id
|
||||||
|
/// [offset] 开始下标
|
||||||
|
/// [count] 每页大小
|
||||||
Future<List<DeptMemberInfo>> getDeptMember({
|
Future<List<DeptMemberInfo>> getDeptMember({
|
||||||
required String departmentID,
|
required String departmentID,
|
||||||
int offset = 0,
|
int offset = 0,
|
||||||
@@ -53,8 +56,8 @@ class OrganizationManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (v) => DeptMemberInfo.fromJson(v)));
|
Utils.toList(value, (v) => DeptMemberInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Get member's department
|
|
||||||
/// 获取成员所在的部门
|
/// 获取成员所在的部门
|
||||||
|
/// [userID] 成员ID
|
||||||
Future<List<UserInDept>> getUserInDept({
|
Future<List<UserInDept>> getUserInDept({
|
||||||
required String userID,
|
required String userID,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -68,8 +71,8 @@ class OrganizationManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toList(value, (v) => UserInDept.fromJson(v)));
|
.then((value) => Utils.toList(value, (v) => UserInDept.fromJson(v)));
|
||||||
|
|
||||||
/// Get the sub-departments and employees under the department
|
|
||||||
/// 获取部门下的子部门跟员工
|
/// 获取部门下的子部门跟员工
|
||||||
|
/// [departmentID] 当前部门id
|
||||||
Future<DeptMemberAndSubDept> getDeptMemberAndSubDept({
|
Future<DeptMemberAndSubDept> getDeptMemberAndSubDept({
|
||||||
required String departmentID,
|
required String departmentID,
|
||||||
// int departmentOffset = 0,
|
// int departmentOffset = 0,
|
||||||
@@ -92,6 +95,66 @@ class OrganizationManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toObj(value, (v) => DeptMemberAndSubDept.fromJson(v)));
|
Utils.toObj(value, (v) => DeptMemberAndSubDept.fromJson(v)));
|
||||||
|
|
||||||
|
/// 查询部门信息
|
||||||
|
/// [departmentID] 部门ID
|
||||||
|
Future<DeptInfo> getDeptInfo({
|
||||||
|
required String departmentID,
|
||||||
|
String? operationID,
|
||||||
|
}) =>
|
||||||
|
_channel
|
||||||
|
.invokeMethod(
|
||||||
|
'getDepartmentInfo',
|
||||||
|
_buildParam({
|
||||||
|
'departmentID': departmentID,
|
||||||
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
|
}))
|
||||||
|
.then((value) => Utils.toObj(value, (v) => DeptInfo.fromJson(v)));
|
||||||
|
|
||||||
|
/// 搜索组织人员
|
||||||
|
/// [keyWord] 关键字
|
||||||
|
/// [isSearchUserName] 是否匹配用户名
|
||||||
|
/// [isSearchEnglishName] 是否匹配英文名
|
||||||
|
/// [isSearchPosition] 是否匹配职位
|
||||||
|
/// [isSearchUserID] 是否匹配用户ID
|
||||||
|
/// [isSearchMobile] 是否匹配手机号
|
||||||
|
/// [isSearchEmail] 是否匹配邮箱号
|
||||||
|
/// [isSearchTelephone] 是否匹配电话号码
|
||||||
|
/// [offset] 开始下标
|
||||||
|
/// [count] 分页大小
|
||||||
|
Future<OrganizationSearchResult> searchOrganization({
|
||||||
|
required String keyWord,
|
||||||
|
bool isSearchUserName = false,
|
||||||
|
bool isSearchEnglishName = false,
|
||||||
|
bool isSearchPosition = false,
|
||||||
|
bool isSearchUserID = false,
|
||||||
|
bool isSearchMobile = false,
|
||||||
|
bool isSearchEmail = false,
|
||||||
|
bool isSearchTelephone = false,
|
||||||
|
int offset = 0,
|
||||||
|
int count = 40,
|
||||||
|
String? operationID,
|
||||||
|
}) =>
|
||||||
|
_channel
|
||||||
|
.invokeMethod(
|
||||||
|
'searchOrganization',
|
||||||
|
_buildParam({
|
||||||
|
'searchParams': {
|
||||||
|
'keyWord': keyWord,
|
||||||
|
'isSearchUserName': isSearchUserName,
|
||||||
|
'isSearchEnglishName': isSearchEnglishName,
|
||||||
|
'isSearchPosition': isSearchPosition,
|
||||||
|
'isSearchUserID': isSearchUserID,
|
||||||
|
'isSearchMobile': isSearchMobile,
|
||||||
|
'isSearchEmail': isSearchEmail,
|
||||||
|
'isSearchTelephone': isSearchTelephone,
|
||||||
|
},
|
||||||
|
'offset': offset,
|
||||||
|
'count': count,
|
||||||
|
'operationID': Utils.checkOperationID(operationID),
|
||||||
|
}))
|
||||||
|
.then((value) =>
|
||||||
|
Utils.toObj(value, (v) => OrganizationSearchResult.fromJson(v)));
|
||||||
|
|
||||||
static Map _buildParam(Map param) {
|
static Map _buildParam(Map param) {
|
||||||
param["ManagerName"] = "organizationManager";
|
param["ManagerName"] = "organizationManager";
|
||||||
return param;
|
return param;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class SignalingManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// 邀请个人加入音视频
|
/// 邀请个人加入音视频
|
||||||
|
/// [info] 信令对象[SignalingInfo]
|
||||||
Future<SignalingCertificate> signalingInvite({
|
Future<SignalingCertificate> signalingInvite({
|
||||||
required SignalingInfo info,
|
required SignalingInfo info,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -30,6 +31,7 @@ class SignalingManager {
|
|||||||
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
||||||
|
|
||||||
/// 邀请群里某些人加入音视频
|
/// 邀请群里某些人加入音视频
|
||||||
|
/// [info] 信令对象[SignalingInfo]
|
||||||
Future<SignalingCertificate> signalingInviteInGroup({
|
Future<SignalingCertificate> signalingInviteInGroup({
|
||||||
required SignalingInfo info,
|
required SignalingInfo info,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -45,6 +47,7 @@ class SignalingManager {
|
|||||||
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
||||||
|
|
||||||
/// 同意某人音视频邀请
|
/// 同意某人音视频邀请
|
||||||
|
/// [info] 信令对象[SignalingInfo]
|
||||||
Future<SignalingCertificate> signalingAccept({
|
Future<SignalingCertificate> signalingAccept({
|
||||||
required SignalingInfo info,
|
required SignalingInfo info,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -60,6 +63,7 @@ class SignalingManager {
|
|||||||
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
Utils.toObj(value, (map) => SignalingCertificate.fromJson(map)));
|
||||||
|
|
||||||
/// 拒绝某人音视频邀请
|
/// 拒绝某人音视频邀请
|
||||||
|
/// [info] 信令对象[SignalingInfo]
|
||||||
Future<dynamic> signalingReject({
|
Future<dynamic> signalingReject({
|
||||||
required SignalingInfo info,
|
required SignalingInfo info,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -72,6 +76,7 @@ class SignalingManager {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
/// 邀请者取消音视频通话
|
/// 邀请者取消音视频通话
|
||||||
|
/// [info] 信令对象[SignalingInfo]
|
||||||
Future<dynamic> signalingCancel({
|
Future<dynamic> signalingCancel({
|
||||||
required SignalingInfo info,
|
required SignalingInfo info,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -84,6 +89,7 @@ class SignalingManager {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
/// 挂断
|
/// 挂断
|
||||||
|
/// [info] 信令对象[SignalingInfo]
|
||||||
Future<dynamic> signalingHungUp({
|
Future<dynamic> signalingHungUp({
|
||||||
required SignalingInfo info,
|
required SignalingInfo info,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
|
|||||||
@@ -7,15 +7,14 @@ class UserManager {
|
|||||||
|
|
||||||
UserManager(this._channel);
|
UserManager(this._channel);
|
||||||
|
|
||||||
/// Observe user info changes
|
|
||||||
/// 用户资料改变监听
|
/// 用户资料改变监听
|
||||||
Future setUserListener(OnUserListener listener) {
|
Future setUserListener(OnUserListener listener) {
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
return _channel.invokeMethod('setUserListener', _buildParam({}));
|
return _channel.invokeMethod('setUserListener', _buildParam({}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Query user information
|
|
||||||
/// 获取用户资料
|
/// 获取用户资料
|
||||||
|
/// [uidList] 用户ID列表
|
||||||
Future<List<UserInfo>> getUsersInfo({
|
Future<List<UserInfo>> getUsersInfo({
|
||||||
required List<String> uidList,
|
required List<String> uidList,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -29,7 +28,6 @@ class UserManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
|
.then((value) => Utils.toList(value, (v) => UserInfo.fromJson(v)));
|
||||||
|
|
||||||
/// Get the information of the currently logged in user
|
|
||||||
/// 获取当前登录用户的信息
|
/// 获取当前登录用户的信息
|
||||||
Future<UserInfo> getSelfUserInfo({
|
Future<UserInfo> getSelfUserInfo({
|
||||||
String? operationID,
|
String? operationID,
|
||||||
@@ -42,8 +40,15 @@ class UserManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => UserInfo.fromJson(map)));
|
.then((value) => Utils.toObj(value, (map) => UserInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Modify current user info
|
|
||||||
/// 修改当前登录用户资料
|
/// 修改当前登录用户资料
|
||||||
|
/// [nickname] 昵称
|
||||||
|
/// [faceURL] 头像
|
||||||
|
/// [gender] 性别
|
||||||
|
/// [appMangerLevel]
|
||||||
|
/// [phoneNumber] 手机号
|
||||||
|
/// [birth] 出生日期
|
||||||
|
/// [email] 邮箱
|
||||||
|
/// [ex] 扩展字段
|
||||||
Future<String?> setSelfInfo({
|
Future<String?> setSelfInfo({
|
||||||
String? nickname,
|
String? nickname,
|
||||||
String? faceURL,
|
String? faceURL,
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ class WorkMomentsManager {
|
|||||||
|
|
||||||
WorkMomentsManager(this._channel);
|
WorkMomentsManager(this._channel);
|
||||||
|
|
||||||
/// Observe work moments changes
|
/// 朋友圈信息发送变化通知
|
||||||
Future setWorkMomentsListener(OnWorkMomentsListener listener) {
|
Future setWorkMomentsListener(OnWorkMomentsListener listener) {
|
||||||
this.listener = listener;
|
this.listener = listener;
|
||||||
return _channel.invokeMethod('setWorkMomentsListener', _buildParam({}));
|
return _channel.invokeMethod('setWorkMomentsListener', _buildParam({}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get work moments unread count
|
/// 获取朋友圈未读消息总数
|
||||||
Future<int> getWorkMomentsUnReadCount({
|
Future<int> getWorkMomentsUnReadCount({
|
||||||
String? operationID,
|
String? operationID,
|
||||||
}) =>
|
}) =>
|
||||||
@@ -25,7 +25,9 @@ class WorkMomentsManager {
|
|||||||
}))
|
}))
|
||||||
.then((value) => Utils.toObj(value, (map) => map['unreadCount']));
|
.then((value) => Utils.toObj(value, (map) => map['unreadCount']));
|
||||||
|
|
||||||
/// Get work moments notification list
|
/// 获取通知列表
|
||||||
|
/// [offset] 开始下标
|
||||||
|
/// [count] 每页大小
|
||||||
Future<List<WorkMomentsInfo>> getWorkMomentsNotification({
|
Future<List<WorkMomentsInfo>> getWorkMomentsNotification({
|
||||||
required int offset,
|
required int offset,
|
||||||
required int count,
|
required int count,
|
||||||
@@ -42,7 +44,7 @@ class WorkMomentsManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toList(value, (map) => WorkMomentsInfo.fromJson(map)));
|
Utils.toList(value, (map) => WorkMomentsInfo.fromJson(map)));
|
||||||
|
|
||||||
/// Clear work moments notification
|
/// 清除通知列表
|
||||||
Future clearWorkMomentsNotification({
|
Future clearWorkMomentsNotification({
|
||||||
String? operationID,
|
String? operationID,
|
||||||
}) =>
|
}) =>
|
||||||
|
|||||||
@@ -3,24 +3,55 @@ import 'dart:convert';
|
|||||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
|
|
||||||
class ConversationInfo {
|
class ConversationInfo {
|
||||||
|
/// 会话ID
|
||||||
String conversationID;
|
String conversationID;
|
||||||
|
|
||||||
/// [ConversationType]
|
/// 会话类型[ConversationType]
|
||||||
int? conversationType;
|
int? conversationType;
|
||||||
|
|
||||||
|
/// 参与会话的userID
|
||||||
String? userID;
|
String? userID;
|
||||||
|
|
||||||
|
/// 参与会话的groupID
|
||||||
String? groupID;
|
String? groupID;
|
||||||
|
|
||||||
|
/// 昵称
|
||||||
String? showName;
|
String? showName;
|
||||||
|
|
||||||
|
/// 头像
|
||||||
String? faceURL;
|
String? faceURL;
|
||||||
|
|
||||||
|
/// 免打扰 0:正常;1:不接受消息;2:接受在线消息不接受离线消息;
|
||||||
int? recvMsgOpt;
|
int? recvMsgOpt;
|
||||||
|
|
||||||
|
/// 未读消息数
|
||||||
int? unreadCount;
|
int? unreadCount;
|
||||||
|
|
||||||
|
/// 强制提示,[GroupAtType]包含@所有人,@个人以及公告提示
|
||||||
int? groupAtType;
|
int? groupAtType;
|
||||||
|
|
||||||
|
/// 会话最新消息内容
|
||||||
Message? latestMsg;
|
Message? latestMsg;
|
||||||
|
|
||||||
|
/// 最新消息发送时间
|
||||||
int? latestMsgSendTime;
|
int? latestMsgSendTime;
|
||||||
|
|
||||||
|
/// 草稿
|
||||||
String? draftText;
|
String? draftText;
|
||||||
|
|
||||||
|
/// 草稿生成时间
|
||||||
int? draftTextTime;
|
int? draftTextTime;
|
||||||
|
|
||||||
|
/// 是否置顶
|
||||||
bool? isPinned;
|
bool? isPinned;
|
||||||
|
|
||||||
|
/// 是否开启了私聊(阅后即焚)
|
||||||
bool? isPrivateChat;
|
bool? isPrivateChat;
|
||||||
|
|
||||||
|
/// 附加内容
|
||||||
String? ext;
|
String? ext;
|
||||||
|
|
||||||
|
/// 是否还在组内,如果退群返回true
|
||||||
bool? isNotInGroup;
|
bool? isNotInGroup;
|
||||||
|
|
||||||
ConversationInfo({
|
ConversationInfo({
|
||||||
|
|||||||
@@ -1,19 +1,46 @@
|
|||||||
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
|
|
||||||
|
/// 群信息
|
||||||
class GroupInfo {
|
class GroupInfo {
|
||||||
|
/// 群ID
|
||||||
String groupID;
|
String groupID;
|
||||||
|
|
||||||
|
/// 群名
|
||||||
String? groupName;
|
String? groupName;
|
||||||
|
|
||||||
|
/// 群公告
|
||||||
String? notification;
|
String? notification;
|
||||||
|
|
||||||
|
/// 群简介
|
||||||
String? introduction;
|
String? introduction;
|
||||||
|
|
||||||
|
/// 群头像
|
||||||
String? faceURL;
|
String? faceURL;
|
||||||
|
|
||||||
|
/// 拥有者ID
|
||||||
String? ownerUserID;
|
String? ownerUserID;
|
||||||
|
|
||||||
|
/// 创建时间
|
||||||
int? createTime;
|
int? createTime;
|
||||||
|
|
||||||
|
/// 群成员数
|
||||||
int? memberCount;
|
int? memberCount;
|
||||||
|
|
||||||
/// ok = 0 blocked = 1 Dismissed = 2 Muted = 3
|
/// 群状态:0正常,1被封,2解散,3禁言
|
||||||
int? status;
|
int? status;
|
||||||
|
|
||||||
|
/// 创建者ID
|
||||||
String? creatorUserID;
|
String? creatorUserID;
|
||||||
|
|
||||||
|
/// 群类型
|
||||||
int? groupType;
|
int? groupType;
|
||||||
|
|
||||||
|
/// 扩展字段
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
|
/// 进群验证方式[GroupVerification]
|
||||||
|
int? needVerification;
|
||||||
|
|
||||||
GroupInfo({
|
GroupInfo({
|
||||||
required this.groupID,
|
required this.groupID,
|
||||||
this.groupName,
|
this.groupName,
|
||||||
@@ -27,6 +54,7 @@ class GroupInfo {
|
|||||||
this.creatorUserID,
|
this.creatorUserID,
|
||||||
this.groupType,
|
this.groupType,
|
||||||
this.ex,
|
this.ex,
|
||||||
|
this.needVerification,
|
||||||
});
|
});
|
||||||
|
|
||||||
GroupInfo.fromJson(Map<String, dynamic> json) : groupID = json['groupID'] {
|
GroupInfo.fromJson(Map<String, dynamic> json) : groupID = json['groupID'] {
|
||||||
@@ -42,6 +70,7 @@ class GroupInfo {
|
|||||||
creatorUserID = json['creatorUserID'];
|
creatorUserID = json['creatorUserID'];
|
||||||
groupType = json['groupType'];
|
groupType = json['groupType'];
|
||||||
ex = json['ex'];
|
ex = json['ex'];
|
||||||
|
needVerification = json['needVerification'];
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@@ -58,20 +87,41 @@ class GroupInfo {
|
|||||||
data['creatorUserID'] = this.creatorUserID;
|
data['creatorUserID'] = this.creatorUserID;
|
||||||
data['groupType'] = this.groupType;
|
data['groupType'] = this.groupType;
|
||||||
data['ex'] = this.ex;
|
data['ex'] = this.ex;
|
||||||
|
data['needVerification'] = this.needVerification;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群成员信息
|
||||||
class GroupMembersInfo {
|
class GroupMembersInfo {
|
||||||
|
/// 群id
|
||||||
String? groupID;
|
String? groupID;
|
||||||
|
|
||||||
|
/// 用户id
|
||||||
String? userID;
|
String? userID;
|
||||||
|
|
||||||
|
/// 昵称
|
||||||
String? nickname;
|
String? nickname;
|
||||||
|
|
||||||
|
/// 头像
|
||||||
String? faceURL;
|
String? faceURL;
|
||||||
|
|
||||||
|
/// 角色[GroupRoleLevel]
|
||||||
int? roleLevel;
|
int? roleLevel;
|
||||||
|
|
||||||
|
/// 加入时间
|
||||||
int? joinTime;
|
int? joinTime;
|
||||||
|
|
||||||
|
/// 入群方式
|
||||||
int? joinSource;
|
int? joinSource;
|
||||||
|
|
||||||
|
/// 操作者id
|
||||||
String? operatorUserID;
|
String? operatorUserID;
|
||||||
String? ext;
|
|
||||||
|
/// 扩展字段
|
||||||
|
String? ex;
|
||||||
|
|
||||||
|
/// 禁言时间s
|
||||||
int? muteEndTime;
|
int? muteEndTime;
|
||||||
int? appMangerLevel;
|
int? appMangerLevel;
|
||||||
|
|
||||||
@@ -82,7 +132,7 @@ class GroupMembersInfo {
|
|||||||
this.joinTime,
|
this.joinTime,
|
||||||
this.nickname,
|
this.nickname,
|
||||||
this.faceURL,
|
this.faceURL,
|
||||||
this.ext,
|
this.ex,
|
||||||
this.joinSource,
|
this.joinSource,
|
||||||
this.operatorUserID,
|
this.operatorUserID,
|
||||||
this.muteEndTime,
|
this.muteEndTime,
|
||||||
@@ -96,7 +146,7 @@ class GroupMembersInfo {
|
|||||||
joinTime = json['joinTime'];
|
joinTime = json['joinTime'];
|
||||||
nickname = json['nickname'];
|
nickname = json['nickname'];
|
||||||
faceURL = json['faceURL'];
|
faceURL = json['faceURL'];
|
||||||
ext = json['ext'];
|
ex = json['ex'];
|
||||||
joinSource = json['joinSource'];
|
joinSource = json['joinSource'];
|
||||||
operatorUserID = json['operatorUserID'];
|
operatorUserID = json['operatorUserID'];
|
||||||
muteEndTime = json['muteEndTime'];
|
muteEndTime = json['muteEndTime'];
|
||||||
@@ -111,7 +161,7 @@ class GroupMembersInfo {
|
|||||||
data['joinTime'] = this.joinTime;
|
data['joinTime'] = this.joinTime;
|
||||||
data['nickname'] = this.nickname;
|
data['nickname'] = this.nickname;
|
||||||
data['faceURL'] = this.faceURL;
|
data['faceURL'] = this.faceURL;
|
||||||
data['ext'] = this.ext;
|
data['ex'] = this.ex;
|
||||||
data['joinSource'] = this.joinSource;
|
data['joinSource'] = this.joinSource;
|
||||||
data['operatorUserID'] = this.operatorUserID;
|
data['operatorUserID'] = this.operatorUserID;
|
||||||
data['muteEndTime'] = this.muteEndTime;
|
data['muteEndTime'] = this.muteEndTime;
|
||||||
@@ -120,11 +170,12 @@ class GroupMembersInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群成员角色
|
||||||
class GroupMemberRole {
|
class GroupMemberRole {
|
||||||
|
/// 用户ID
|
||||||
String? userID;
|
String? userID;
|
||||||
|
|
||||||
/// 1 ordinary member, 2 group owners, 3 administrators
|
/// [GroupRoleLevel] 1普通成员, 2群主,3管理员
|
||||||
/// 1普通成员, 2群主,3管理员
|
|
||||||
int? roleLevel;
|
int? roleLevel;
|
||||||
|
|
||||||
GroupMemberRole({this.userID, this.roleLevel = 1});
|
GroupMemberRole({this.userID, this.roleLevel = 1});
|
||||||
@@ -142,31 +193,72 @@ class GroupMemberRole {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群申请信息
|
||||||
class GroupApplicationInfo {
|
class GroupApplicationInfo {
|
||||||
|
/// 群ID
|
||||||
String? groupID;
|
String? groupID;
|
||||||
|
|
||||||
|
/// 群昵称
|
||||||
String? groupName;
|
String? groupName;
|
||||||
|
|
||||||
|
/// 群公告
|
||||||
String? notification;
|
String? notification;
|
||||||
|
|
||||||
|
/// 群介绍
|
||||||
String? introduction;
|
String? introduction;
|
||||||
|
|
||||||
|
/// 群头像
|
||||||
String? groupFaceURL;
|
String? groupFaceURL;
|
||||||
|
|
||||||
|
/// 群创建时间
|
||||||
int? createTime;
|
int? createTime;
|
||||||
|
|
||||||
|
/// 群状态
|
||||||
int? status;
|
int? status;
|
||||||
|
|
||||||
|
/// 创建者id
|
||||||
String? creatorUserID;
|
String? creatorUserID;
|
||||||
|
|
||||||
|
/// 群类型
|
||||||
int? groupType;
|
int? groupType;
|
||||||
|
|
||||||
|
/// 拥有者id
|
||||||
String? ownerUserID;
|
String? ownerUserID;
|
||||||
|
|
||||||
|
/// 成员数量
|
||||||
int? memberCount;
|
int? memberCount;
|
||||||
|
|
||||||
|
/// 发起入群申请的用户id
|
||||||
String? userID;
|
String? userID;
|
||||||
|
|
||||||
|
/// 发起入群申请的用户昵称
|
||||||
String? nickname;
|
String? nickname;
|
||||||
|
|
||||||
|
/// 发起入群申请的用户头像
|
||||||
String? userFaceURL;
|
String? userFaceURL;
|
||||||
|
|
||||||
|
/// 发起入群申请的用户性别
|
||||||
int? gender;
|
int? gender;
|
||||||
|
|
||||||
/// REFUSE = -1, AGREE = 1
|
/// 处理结果:-1:拒绝,1:同意
|
||||||
/// -1:拒绝,1:同意
|
|
||||||
int? handleResult;
|
int? handleResult;
|
||||||
|
|
||||||
|
/// 请求说明
|
||||||
String? reqMsg;
|
String? reqMsg;
|
||||||
|
|
||||||
|
/// 处理结果说明
|
||||||
String? handledMsg;
|
String? handledMsg;
|
||||||
|
|
||||||
|
/// 请求时间
|
||||||
int? reqTime;
|
int? reqTime;
|
||||||
|
|
||||||
|
/// 处理者用户ID
|
||||||
String? handleUserID;
|
String? handleUserID;
|
||||||
|
|
||||||
|
/// 处理时间
|
||||||
int? handledTime;
|
int? handledTime;
|
||||||
|
|
||||||
|
/// 扩展信息
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
GroupApplicationInfo({
|
GroupApplicationInfo({
|
||||||
|
|||||||
@@ -1,43 +1,108 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
|
|
||||||
class Message {
|
class Message {
|
||||||
|
/// 消息id,唯一标识
|
||||||
String? clientMsgID;
|
String? clientMsgID;
|
||||||
|
|
||||||
|
/// 服务端生成的id
|
||||||
String? serverMsgID;
|
String? serverMsgID;
|
||||||
|
|
||||||
|
/// 创建时间
|
||||||
int? createTime;
|
int? createTime;
|
||||||
|
|
||||||
|
/// 发送时间
|
||||||
int? sendTime;
|
int? sendTime;
|
||||||
|
|
||||||
/// [ConversationType]
|
/// 会话类型[ConversationType]
|
||||||
int? sessionType;
|
int? sessionType;
|
||||||
|
|
||||||
|
/// 发送者id
|
||||||
String? sendID;
|
String? sendID;
|
||||||
|
|
||||||
|
/// 接收者id
|
||||||
String? recvID;
|
String? recvID;
|
||||||
|
|
||||||
|
/// 来源
|
||||||
int? msgFrom;
|
int? msgFrom;
|
||||||
|
|
||||||
/// [MessageType]
|
/// 消息类型[MessageType]
|
||||||
int? contentType;
|
int? contentType;
|
||||||
|
|
||||||
|
/// 平台[Platform]
|
||||||
int? platformID;
|
int? platformID;
|
||||||
|
|
||||||
|
/// 发送者昵称
|
||||||
String? senderNickname;
|
String? senderNickname;
|
||||||
|
|
||||||
|
/// 发送者头像
|
||||||
String? senderFaceUrl;
|
String? senderFaceUrl;
|
||||||
|
|
||||||
|
/// 群ID
|
||||||
String? groupID;
|
String? groupID;
|
||||||
|
|
||||||
|
/// 消息内容
|
||||||
String? content;
|
String? content;
|
||||||
|
|
||||||
|
/// 消息的seq
|
||||||
int? seq;
|
int? seq;
|
||||||
|
|
||||||
|
/// 是否已读
|
||||||
bool? isRead;
|
bool? isRead;
|
||||||
|
|
||||||
|
/// 已读时间
|
||||||
int? hasReadTime;
|
int? hasReadTime;
|
||||||
|
|
||||||
/// [MessageStatus]
|
/// 消息发送状态[MessageStatus]
|
||||||
int? status;
|
int? status;
|
||||||
|
|
||||||
|
/// 离线显示内容
|
||||||
OfflinePushInfo? offlinePush;
|
OfflinePushInfo? offlinePush;
|
||||||
|
|
||||||
|
/// 附加信息
|
||||||
String? attachedInfo;
|
String? attachedInfo;
|
||||||
|
|
||||||
|
/// 扩展信息
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
|
/// 自定义扩展信息,目前用于客服端处理消息时间分段
|
||||||
dynamic ext;
|
dynamic ext;
|
||||||
|
|
||||||
|
/// 图片
|
||||||
PictureElem? pictureElem;
|
PictureElem? pictureElem;
|
||||||
|
|
||||||
|
/// 语音
|
||||||
SoundElem? soundElem;
|
SoundElem? soundElem;
|
||||||
|
|
||||||
|
/// 视频
|
||||||
VideoElem? videoElem;
|
VideoElem? videoElem;
|
||||||
|
|
||||||
|
/// 文件
|
||||||
FileElem? fileElem;
|
FileElem? fileElem;
|
||||||
|
|
||||||
|
/// @信息
|
||||||
AtElem? atElem;
|
AtElem? atElem;
|
||||||
|
|
||||||
|
/// 位置
|
||||||
LocationElem? locationElem;
|
LocationElem? locationElem;
|
||||||
|
|
||||||
|
/// 自定义
|
||||||
CustomElem? customElem;
|
CustomElem? customElem;
|
||||||
|
|
||||||
|
/// 引用
|
||||||
QuoteElem? quoteElem;
|
QuoteElem? quoteElem;
|
||||||
|
|
||||||
|
/// 合并
|
||||||
MergeElem? mergeElem;
|
MergeElem? mergeElem;
|
||||||
|
|
||||||
|
/// 通知
|
||||||
NotificationElem? notificationElem;
|
NotificationElem? notificationElem;
|
||||||
|
|
||||||
|
/// 自定义表情
|
||||||
FaceElem? faceElem;
|
FaceElem? faceElem;
|
||||||
|
|
||||||
|
/// 附加信息
|
||||||
AttachedInfoElem? attachedInfoElem;
|
AttachedInfoElem? attachedInfoElem;
|
||||||
|
|
||||||
Message({
|
Message({
|
||||||
@@ -224,10 +289,18 @@ class Message {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 图片消息内容
|
||||||
class PictureElem {
|
class PictureElem {
|
||||||
|
/// 原路径
|
||||||
String? sourcePath;
|
String? sourcePath;
|
||||||
|
|
||||||
|
/// 原图对象
|
||||||
PictureInfo? sourcePicture;
|
PictureInfo? sourcePicture;
|
||||||
|
|
||||||
|
/// 大图对象
|
||||||
PictureInfo? bigPicture;
|
PictureInfo? bigPicture;
|
||||||
|
|
||||||
|
/// 缩率图对象
|
||||||
PictureInfo? snapshotPicture;
|
PictureInfo? snapshotPicture;
|
||||||
|
|
||||||
PictureElem(
|
PictureElem(
|
||||||
@@ -265,12 +338,24 @@ class PictureElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 图片信息
|
||||||
class PictureInfo {
|
class PictureInfo {
|
||||||
|
/// id
|
||||||
String? uuid;
|
String? uuid;
|
||||||
|
|
||||||
|
/// 图片mime类型
|
||||||
String? type;
|
String? type;
|
||||||
|
|
||||||
|
/// 大小
|
||||||
int? size;
|
int? size;
|
||||||
|
|
||||||
|
/// 宽度
|
||||||
int? width;
|
int? width;
|
||||||
|
|
||||||
|
/// 长度
|
||||||
int? height;
|
int? height;
|
||||||
|
|
||||||
|
/// 图片URL地址
|
||||||
String? url;
|
String? url;
|
||||||
|
|
||||||
PictureInfo(
|
PictureInfo(
|
||||||
@@ -297,11 +382,21 @@ class PictureInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 语音消息内容
|
||||||
class SoundElem {
|
class SoundElem {
|
||||||
|
/// id
|
||||||
String? uuid;
|
String? uuid;
|
||||||
|
|
||||||
|
/// 原路径
|
||||||
String? soundPath;
|
String? soundPath;
|
||||||
|
|
||||||
|
/// url地址
|
||||||
String? sourceUrl;
|
String? sourceUrl;
|
||||||
|
|
||||||
|
/// 大小
|
||||||
int? dataSize;
|
int? dataSize;
|
||||||
|
|
||||||
|
/// 时间s
|
||||||
int? duration;
|
int? duration;
|
||||||
|
|
||||||
SoundElem(
|
SoundElem(
|
||||||
@@ -330,18 +425,42 @@ class SoundElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 视频消息内容
|
||||||
class VideoElem {
|
class VideoElem {
|
||||||
|
/// 视频路径
|
||||||
String? videoPath;
|
String? videoPath;
|
||||||
|
|
||||||
|
/// uuid
|
||||||
String? videoUUID;
|
String? videoUUID;
|
||||||
|
|
||||||
|
/// 视频的url地址
|
||||||
String? videoUrl;
|
String? videoUrl;
|
||||||
|
|
||||||
|
/// mime类型
|
||||||
String? videoType;
|
String? videoType;
|
||||||
|
|
||||||
|
/// 大小
|
||||||
int? videoSize;
|
int? videoSize;
|
||||||
|
|
||||||
|
/// 时长s
|
||||||
int? duration;
|
int? duration;
|
||||||
|
|
||||||
|
/// 缩率图路径
|
||||||
String? snapshotPath;
|
String? snapshotPath;
|
||||||
|
|
||||||
|
/// 缩率图uuid
|
||||||
String? snapshotUUID;
|
String? snapshotUUID;
|
||||||
|
|
||||||
|
/// 缩率图大小
|
||||||
int? snapshotSize;
|
int? snapshotSize;
|
||||||
|
|
||||||
|
/// 缩率图URL地址
|
||||||
String? snapshotUrl;
|
String? snapshotUrl;
|
||||||
|
|
||||||
|
/// 缩率图宽度
|
||||||
int? snapshotWidth;
|
int? snapshotWidth;
|
||||||
|
|
||||||
|
/// 缩率图高度
|
||||||
int? snapshotHeight;
|
int? snapshotHeight;
|
||||||
|
|
||||||
VideoElem(
|
VideoElem(
|
||||||
@@ -391,11 +510,21 @@ class VideoElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 文件消息内容
|
||||||
class FileElem {
|
class FileElem {
|
||||||
|
/// 文件路径
|
||||||
String? filePath;
|
String? filePath;
|
||||||
|
|
||||||
|
/// uuid
|
||||||
String? uuid;
|
String? uuid;
|
||||||
|
|
||||||
|
/// 文件URL地址
|
||||||
String? sourceUrl;
|
String? sourceUrl;
|
||||||
|
|
||||||
|
/// 文件名
|
||||||
String? fileName;
|
String? fileName;
|
||||||
|
|
||||||
|
/// 文件大小
|
||||||
int? fileSize;
|
int? fileSize;
|
||||||
|
|
||||||
FileElem(
|
FileElem(
|
||||||
@@ -420,11 +549,21 @@ class FileElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @消息内容
|
||||||
class AtElem {
|
class AtElem {
|
||||||
|
/// 消息内容
|
||||||
String? text;
|
String? text;
|
||||||
|
|
||||||
|
/// 被@的用户ID列表
|
||||||
List<String>? atUserList;
|
List<String>? atUserList;
|
||||||
|
|
||||||
|
/// 是否包含自己
|
||||||
bool? isAtSelf;
|
bool? isAtSelf;
|
||||||
|
|
||||||
|
/// 被@的用户ID跟昵称关系列表,用于将消息内容里的用户id替换为昵称显示
|
||||||
List<AtUserInfo>? atUsersInfo;
|
List<AtUserInfo>? atUsersInfo;
|
||||||
|
|
||||||
|
/// 被回复的消息体,回复别人并@了人
|
||||||
Message? quoteMessage;
|
Message? quoteMessage;
|
||||||
|
|
||||||
AtElem({
|
AtElem({
|
||||||
@@ -462,9 +601,15 @@ class AtElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 位置消息内日
|
||||||
class LocationElem {
|
class LocationElem {
|
||||||
|
/// 位置描述
|
||||||
String? description;
|
String? description;
|
||||||
|
|
||||||
|
/// 经度
|
||||||
double? longitude;
|
double? longitude;
|
||||||
|
|
||||||
|
/// 纬度
|
||||||
double? latitude;
|
double? latitude;
|
||||||
|
|
||||||
LocationElem({this.description, this.longitude, this.latitude});
|
LocationElem({this.description, this.longitude, this.latitude});
|
||||||
@@ -493,9 +638,15 @@ class LocationElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 自定义消息
|
||||||
class CustomElem {
|
class CustomElem {
|
||||||
|
/// 自定义数据
|
||||||
String? data;
|
String? data;
|
||||||
|
|
||||||
|
/// 扩展内容
|
||||||
String? extension;
|
String? extension;
|
||||||
|
|
||||||
|
/// 描述内容
|
||||||
String? description;
|
String? description;
|
||||||
|
|
||||||
CustomElem({this.data, this.extension, this.description});
|
CustomElem({this.data, this.extension, this.description});
|
||||||
@@ -515,8 +666,12 @@ class CustomElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 引用消息(被回复的消息)
|
||||||
class QuoteElem {
|
class QuoteElem {
|
||||||
|
/// 回复内容内容
|
||||||
String? text;
|
String? text;
|
||||||
|
|
||||||
|
/// 被回复的消息体
|
||||||
Message? quoteMessage;
|
Message? quoteMessage;
|
||||||
|
|
||||||
QuoteElem({this.text, this.quoteMessage});
|
QuoteElem({this.text, this.quoteMessage});
|
||||||
@@ -536,9 +691,15 @@ class QuoteElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 合并消息体
|
||||||
class MergeElem {
|
class MergeElem {
|
||||||
|
/// 标题
|
||||||
String? title;
|
String? title;
|
||||||
|
|
||||||
|
/// 摘要
|
||||||
List<String>? abstractList;
|
List<String>? abstractList;
|
||||||
|
|
||||||
|
/// 具体选择合并的消息列表
|
||||||
List<Message>? multiMessage;
|
List<Message>? multiMessage;
|
||||||
|
|
||||||
MergeElem({this.title, this.abstractList, this.multiMessage});
|
MergeElem({this.title, this.abstractList, this.multiMessage});
|
||||||
@@ -564,8 +725,12 @@ class MergeElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 通知
|
||||||
class NotificationElem {
|
class NotificationElem {
|
||||||
|
/// 详情
|
||||||
String? detail;
|
String? detail;
|
||||||
|
|
||||||
|
/// 提示
|
||||||
String? defaultTips;
|
String? defaultTips;
|
||||||
|
|
||||||
NotificationElem({this.detail, this.defaultTips});
|
NotificationElem({this.detail, this.defaultTips});
|
||||||
@@ -583,8 +748,12 @@ class NotificationElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 表情
|
||||||
class FaceElem {
|
class FaceElem {
|
||||||
|
/// 位置表情,用户端对端自定义内嵌的表情包
|
||||||
int? index;
|
int? index;
|
||||||
|
|
||||||
|
/// 其他表情,如URL表情直接返回url
|
||||||
String? data;
|
String? data;
|
||||||
|
|
||||||
FaceElem({this.index, this.data});
|
FaceElem({this.index, this.data});
|
||||||
@@ -602,12 +771,18 @@ class FaceElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 附加信息
|
||||||
class AttachedInfoElem {
|
class AttachedInfoElem {
|
||||||
|
/// 群消息已读信息
|
||||||
GroupHasReadInfo? groupHasReadInfo;
|
GroupHasReadInfo? groupHasReadInfo;
|
||||||
|
|
||||||
/// 单聊有效
|
/// 是否为私聊消息(阅后即焚消息),单聊有效
|
||||||
bool? isPrivateChat;
|
bool? isPrivateChat;
|
||||||
|
|
||||||
|
/// 已读时间
|
||||||
int? hasReadTime;
|
int? hasReadTime;
|
||||||
|
|
||||||
|
/// 离线不发送推送
|
||||||
bool? notSenderNotificationPush;
|
bool? notSenderNotificationPush;
|
||||||
|
|
||||||
AttachedInfoElem({
|
AttachedInfoElem({
|
||||||
@@ -636,10 +811,17 @@ class AttachedInfoElem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 群消息已读信息
|
||||||
class GroupHasReadInfo {
|
class GroupHasReadInfo {
|
||||||
|
/// 已读的用户id列表
|
||||||
List<String>? hasReadUserIDList;
|
List<String>? hasReadUserIDList;
|
||||||
|
|
||||||
|
/// 已读总数
|
||||||
int? hasReadCount;
|
int? hasReadCount;
|
||||||
|
|
||||||
|
/// 发送此条消息时的群人数
|
||||||
|
int? groupMemberCount;
|
||||||
|
|
||||||
GroupHasReadInfo.fromJson(Map<String, dynamic> json) {
|
GroupHasReadInfo.fromJson(Map<String, dynamic> json) {
|
||||||
if (json['hasReadUserIDList'] == null) {
|
if (json['hasReadUserIDList'] == null) {
|
||||||
hasReadUserIDList = <String>[];
|
hasReadUserIDList = <String>[];
|
||||||
@@ -647,23 +829,39 @@ class GroupHasReadInfo {
|
|||||||
hasReadUserIDList = (json['hasReadUserIDList'] as List).cast<String>();
|
hasReadUserIDList = (json['hasReadUserIDList'] as List).cast<String>();
|
||||||
}
|
}
|
||||||
hasReadCount = json['hasReadCount'] ?? 0;
|
hasReadCount = json['hasReadCount'] ?? 0;
|
||||||
|
groupMemberCount = json['groupMemberCount'] ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final data = Map<String, dynamic>();
|
final data = Map<String, dynamic>();
|
||||||
data['hasReadUserIDList'] = this.hasReadUserIDList;
|
data['hasReadUserIDList'] = this.hasReadUserIDList;
|
||||||
data['hasReadCount'] = this.hasReadCount;
|
data['hasReadCount'] = this.hasReadCount;
|
||||||
|
data['groupMemberCount'] = this.groupMemberCount;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 消息已读回执信息
|
||||||
class ReadReceiptInfo {
|
class ReadReceiptInfo {
|
||||||
|
/// 发送者id
|
||||||
String? userID;
|
String? userID;
|
||||||
|
|
||||||
|
/// 群id
|
||||||
String? groupID;
|
String? groupID;
|
||||||
|
|
||||||
|
/// 已读消息的clientMsgID集合
|
||||||
List<String>? msgIDList;
|
List<String>? msgIDList;
|
||||||
|
|
||||||
|
/// 读时间
|
||||||
int? readTime;
|
int? readTime;
|
||||||
|
|
||||||
|
/// 消息来源
|
||||||
int? msgFrom;
|
int? msgFrom;
|
||||||
|
|
||||||
|
/// 消息类型[MessageType]
|
||||||
int? contentType;
|
int? contentType;
|
||||||
|
|
||||||
|
/// 会话类型[ConversationType]
|
||||||
int? sessionType;
|
int? sessionType;
|
||||||
|
|
||||||
ReadReceiptInfo(
|
ReadReceiptInfo(
|
||||||
@@ -699,11 +897,21 @@ class ReadReceiptInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 离线推送信息
|
||||||
class OfflinePushInfo {
|
class OfflinePushInfo {
|
||||||
|
/// 通知标题
|
||||||
String? title;
|
String? title;
|
||||||
|
|
||||||
|
/// 通知描述
|
||||||
String? desc;
|
String? desc;
|
||||||
|
|
||||||
|
/// 扩展内容
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
|
/// 仅ios有效
|
||||||
String? iOSPushSound;
|
String? iOSPushSound;
|
||||||
|
|
||||||
|
/// 仅ios有效
|
||||||
bool? iOSBadgeCount;
|
bool? iOSBadgeCount;
|
||||||
|
|
||||||
OfflinePushInfo(
|
OfflinePushInfo(
|
||||||
@@ -728,8 +936,12 @@ class OfflinePushInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @消息用户id跟昵称关系对象
|
||||||
class AtUserInfo {
|
class AtUserInfo {
|
||||||
|
/// 被@的用户id
|
||||||
String? atUserID;
|
String? atUserID;
|
||||||
|
|
||||||
|
/// 被@的用户昵称
|
||||||
String? groupNickname;
|
String? groupNickname;
|
||||||
|
|
||||||
AtUserInfo({this.atUserID, this.groupNickname});
|
AtUserInfo({this.atUserID, this.groupNickname});
|
||||||
|
|||||||
@@ -1,25 +1,38 @@
|
|||||||
import '../../flutter_openim_sdk.dart';
|
import '../../flutter_openim_sdk.dart';
|
||||||
|
|
||||||
/// OA notification
|
|
||||||
/// oa 通知
|
/// oa 通知
|
||||||
class OANotification {
|
class OANotification {
|
||||||
|
/// 标题
|
||||||
String? notificationName;
|
String? notificationName;
|
||||||
|
|
||||||
|
/// 头像
|
||||||
String? notificationFaceURL;
|
String? notificationFaceURL;
|
||||||
|
|
||||||
|
/// 类型
|
||||||
int? notificationType;
|
int? notificationType;
|
||||||
|
|
||||||
|
/// 文本内容
|
||||||
String? text;
|
String? text;
|
||||||
|
|
||||||
|
/// 跳转链接
|
||||||
String? externalUrl;
|
String? externalUrl;
|
||||||
|
|
||||||
/// Notification Mix Type
|
|
||||||
/// 0: Plain text notification
|
|
||||||
/// 1: Text+picture notification
|
|
||||||
/// 2: Text+video notification
|
|
||||||
/// 3: Text+file notification
|
|
||||||
/// 0:纯文字通知 1:文字+图片通知 2:文字+视频通知 3:文字+文件通知
|
/// 0:纯文字通知 1:文字+图片通知 2:文字+视频通知 3:文字+文件通知
|
||||||
int? mixType;
|
int? mixType;
|
||||||
|
|
||||||
|
/// 图片信息
|
||||||
PictureElem? pictureElem;
|
PictureElem? pictureElem;
|
||||||
|
|
||||||
|
/// 语音信息
|
||||||
SoundElem? soundElem;
|
SoundElem? soundElem;
|
||||||
|
|
||||||
|
/// 视频信息
|
||||||
VideoElem? videoElem;
|
VideoElem? videoElem;
|
||||||
|
|
||||||
|
/// 文件信息
|
||||||
FileElem? fileElem;
|
FileElem? fileElem;
|
||||||
|
|
||||||
|
/// 扩展字段
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
OANotification(
|
OANotification(
|
||||||
@@ -81,11 +94,18 @@ class OANotification {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Group common notification
|
/// 群事件通知
|
||||||
class GroupNotification {
|
class GroupNotification {
|
||||||
|
/// 群信息
|
||||||
GroupInfo? group;
|
GroupInfo? group;
|
||||||
|
|
||||||
|
/// 当前事件操作者信息
|
||||||
GroupMembersInfo? opUser;
|
GroupMembersInfo? opUser;
|
||||||
|
|
||||||
|
/// 群拥有者信息
|
||||||
GroupMembersInfo? groupOwnerUser;
|
GroupMembersInfo? groupOwnerUser;
|
||||||
|
|
||||||
|
/// 产生影响的群成员列表
|
||||||
List<GroupMembersInfo>? memberList;
|
List<GroupMembersInfo>? memberList;
|
||||||
|
|
||||||
GroupNotification({
|
GroupNotification({
|
||||||
@@ -129,11 +149,15 @@ class GroupNotification {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// User is invited to the group notification
|
|
||||||
/// 用户被邀请进群通知
|
/// 用户被邀请进群通知
|
||||||
class InvitedJoinGroupNotification {
|
class InvitedJoinGroupNotification {
|
||||||
|
/// 群信息
|
||||||
GroupInfo? group;
|
GroupInfo? group;
|
||||||
|
|
||||||
|
/// 操作者信息
|
||||||
GroupMembersInfo? opUser;
|
GroupMembersInfo? opUser;
|
||||||
|
|
||||||
|
/// 被邀请进群的成员信息
|
||||||
List<GroupMembersInfo>? invitedUserList;
|
List<GroupMembersInfo>? invitedUserList;
|
||||||
|
|
||||||
InvitedJoinGroupNotification({this.group, this.opUser, this.invitedUserList});
|
InvitedJoinGroupNotification({this.group, this.opUser, this.invitedUserList});
|
||||||
@@ -167,11 +191,15 @@ class InvitedJoinGroupNotification {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Group kicked member notification
|
|
||||||
/// 组踢出成员通知
|
/// 组踢出成员通知
|
||||||
class KickedGroupMemeberNotification {
|
class KickedGroupMemeberNotification {
|
||||||
|
/// 群信息
|
||||||
GroupInfo? group;
|
GroupInfo? group;
|
||||||
|
|
||||||
|
/// 操作者信息
|
||||||
GroupMembersInfo? opUser;
|
GroupMembersInfo? opUser;
|
||||||
|
|
||||||
|
/// 被踢出群的成员信息列表
|
||||||
List<GroupMembersInfo>? kickedUserList;
|
List<GroupMembersInfo>? kickedUserList;
|
||||||
|
|
||||||
KickedGroupMemeberNotification(
|
KickedGroupMemeberNotification(
|
||||||
@@ -206,10 +234,12 @@ class KickedGroupMemeberNotification {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Exit group notification
|
|
||||||
/// 退出群通知
|
/// 退出群通知
|
||||||
class QuitGroupNotification {
|
class QuitGroupNotification {
|
||||||
|
/// 群信息
|
||||||
GroupInfo? group;
|
GroupInfo? group;
|
||||||
|
|
||||||
|
/// 退群的成员信息
|
||||||
GroupMembersInfo? quitUser;
|
GroupMembersInfo? quitUser;
|
||||||
|
|
||||||
QuitGroupNotification({this.group, this.quitUser});
|
QuitGroupNotification({this.group, this.quitUser});
|
||||||
@@ -233,10 +263,12 @@ class QuitGroupNotification {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Enter group notification
|
|
||||||
/// 进群通知
|
/// 进群通知
|
||||||
class EnterGroupNotification {
|
class EnterGroupNotification {
|
||||||
|
/// 群信息
|
||||||
GroupInfo? group;
|
GroupInfo? group;
|
||||||
|
|
||||||
|
/// 进入群的成员信息
|
||||||
GroupMembersInfo? entrantUser;
|
GroupMembersInfo? entrantUser;
|
||||||
|
|
||||||
EnterGroupNotification({this.group, this.entrantUser});
|
EnterGroupNotification({this.group, this.entrantUser});
|
||||||
@@ -260,11 +292,15 @@ class EnterGroupNotification {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Group rights transfer noticication
|
|
||||||
/// 群权转让通知
|
/// 群权转让通知
|
||||||
class GroupRightsTransferNoticication {
|
class GroupRightsTransferNoticication {
|
||||||
|
/// 群信息
|
||||||
GroupInfo? group;
|
GroupInfo? group;
|
||||||
|
|
||||||
|
/// 操作者信息
|
||||||
GroupMembersInfo? opUser;
|
GroupMembersInfo? opUser;
|
||||||
|
|
||||||
|
/// 群新的拥有者信息
|
||||||
GroupMembersInfo? newGroupOwner;
|
GroupMembersInfo? newGroupOwner;
|
||||||
|
|
||||||
GroupRightsTransferNoticication({
|
GroupRightsTransferNoticication({
|
||||||
@@ -298,12 +334,18 @@ class GroupRightsTransferNoticication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Mute member notification
|
|
||||||
/// 禁言成员通知
|
/// 禁言成员通知
|
||||||
class MuteMemberNotification {
|
class MuteMemberNotification {
|
||||||
|
/// 群信息
|
||||||
GroupInfo? group;
|
GroupInfo? group;
|
||||||
|
|
||||||
|
/// 操作者信息
|
||||||
GroupMembersInfo? opUser;
|
GroupMembersInfo? opUser;
|
||||||
|
|
||||||
|
/// 被禁言的成员信息
|
||||||
GroupMembersInfo? mutedUser;
|
GroupMembersInfo? mutedUser;
|
||||||
|
|
||||||
|
/// 禁言时间s
|
||||||
int? mutedSeconds;
|
int? mutedSeconds;
|
||||||
|
|
||||||
MuteMemberNotification({
|
MuteMemberNotification({
|
||||||
@@ -340,11 +382,15 @@ class MuteMemberNotification {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Burn after reading notification
|
|
||||||
/// 阅后即焚通知
|
/// 阅后即焚通知
|
||||||
class BurnAfterReadingNotification {
|
class BurnAfterReadingNotification {
|
||||||
|
/// 接收者
|
||||||
String? recvID;
|
String? recvID;
|
||||||
|
|
||||||
|
/// 发送者
|
||||||
String? sendID;
|
String? sendID;
|
||||||
|
|
||||||
|
/// 是否开启
|
||||||
bool? isPrivate;
|
bool? isPrivate;
|
||||||
|
|
||||||
BurnAfterReadingNotification({this.recvID, this.sendID, this.isPrivate});
|
BurnAfterReadingNotification({this.recvID, this.sendID, this.isPrivate});
|
||||||
@@ -364,11 +410,15 @@ class BurnAfterReadingNotification {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Group member info changed notification
|
/// 群成员信息发送变化通知
|
||||||
/// 禁言成员通知
|
|
||||||
class GroupMemberInfoChangedNotification {
|
class GroupMemberInfoChangedNotification {
|
||||||
|
/// 群信息
|
||||||
GroupInfo? group;
|
GroupInfo? group;
|
||||||
|
|
||||||
|
/// 操作者信息
|
||||||
GroupMembersInfo? opUser;
|
GroupMembersInfo? opUser;
|
||||||
|
|
||||||
|
/// 资料发生改变的成员
|
||||||
GroupMembersInfo? changedUser;
|
GroupMembersInfo? changedUser;
|
||||||
|
|
||||||
GroupMemberInfoChangedNotification({
|
GroupMemberInfoChangedNotification({
|
||||||
|
|||||||
@@ -1,14 +1,36 @@
|
|||||||
|
/// 部门信息
|
||||||
class DeptInfo {
|
class DeptInfo {
|
||||||
|
/// 部门id
|
||||||
String? departmentID;
|
String? departmentID;
|
||||||
|
|
||||||
|
/// 头像
|
||||||
String? faceURL;
|
String? faceURL;
|
||||||
|
|
||||||
|
/// 显示名
|
||||||
String? name;
|
String? name;
|
||||||
|
|
||||||
|
/// 上一级部门id
|
||||||
String? parentID;
|
String? parentID;
|
||||||
|
|
||||||
|
/// 排序方式
|
||||||
int? order;
|
int? order;
|
||||||
|
|
||||||
|
/// 部门类型
|
||||||
int? departmentType;
|
int? departmentType;
|
||||||
|
|
||||||
|
/// 创建时间
|
||||||
int? createTime;
|
int? createTime;
|
||||||
|
|
||||||
|
/// 子部门数量
|
||||||
int? subDepartmentNum;
|
int? subDepartmentNum;
|
||||||
|
|
||||||
|
/// 成员数量
|
||||||
int? memberNum;
|
int? memberNum;
|
||||||
|
|
||||||
|
/// 扩展字段
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
|
/// 附加信息
|
||||||
String? attachedInfo;
|
String? attachedInfo;
|
||||||
|
|
||||||
DeptInfo(
|
DeptInfo(
|
||||||
@@ -65,43 +87,86 @@ class DeptInfo {
|
|||||||
int get hashCode => departmentID.hashCode;
|
int get hashCode => departmentID.hashCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 部门成员信息
|
||||||
class DeptMemberInfo {
|
class DeptMemberInfo {
|
||||||
|
/// 用户id
|
||||||
String? userID;
|
String? userID;
|
||||||
|
|
||||||
|
/// 用户昵称
|
||||||
String? nickname;
|
String? nickname;
|
||||||
|
|
||||||
|
/// 英文名
|
||||||
String? englishName;
|
String? englishName;
|
||||||
|
|
||||||
|
/// 头像
|
||||||
String? faceURL;
|
String? faceURL;
|
||||||
|
|
||||||
|
/// 性别
|
||||||
int? gender;
|
int? gender;
|
||||||
|
|
||||||
|
/// 手机号
|
||||||
String? mobile;
|
String? mobile;
|
||||||
|
|
||||||
|
/// 座机
|
||||||
String? telephone;
|
String? telephone;
|
||||||
|
|
||||||
|
/// 出生时间
|
||||||
int? birth;
|
int? birth;
|
||||||
|
|
||||||
|
/// 邮箱
|
||||||
String? email;
|
String? email;
|
||||||
|
|
||||||
|
/// 所在部门的id
|
||||||
String? departmentID;
|
String? departmentID;
|
||||||
|
|
||||||
|
/// 排序方式
|
||||||
int? order;
|
int? order;
|
||||||
|
|
||||||
|
/// 职位
|
||||||
String? position;
|
String? position;
|
||||||
|
|
||||||
|
/// 是否是领导
|
||||||
int? leader;
|
int? leader;
|
||||||
|
|
||||||
|
/// 状态
|
||||||
int? status;
|
int? status;
|
||||||
|
|
||||||
|
/// 创建时间
|
||||||
int? createTime;
|
int? createTime;
|
||||||
|
|
||||||
|
/// 扩展字段
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
|
/// 附加信息
|
||||||
String? attachedInfo;
|
String? attachedInfo;
|
||||||
|
|
||||||
DeptMemberInfo(
|
/// 搜索时使用
|
||||||
{this.userID,
|
String? departmentName;
|
||||||
this.nickname,
|
|
||||||
this.englishName,
|
/// 所在部门的所有上级部门
|
||||||
this.faceURL,
|
List<DeptInfo>? parentDepartmentList;
|
||||||
this.gender,
|
|
||||||
this.mobile,
|
DeptMemberInfo({
|
||||||
this.telephone,
|
this.userID,
|
||||||
this.birth,
|
this.nickname,
|
||||||
this.email,
|
this.englishName,
|
||||||
this.departmentID,
|
this.faceURL,
|
||||||
this.order,
|
this.gender,
|
||||||
this.position,
|
this.mobile,
|
||||||
this.leader,
|
this.telephone,
|
||||||
this.status,
|
this.birth,
|
||||||
this.createTime,
|
this.email,
|
||||||
this.ex,
|
this.departmentID,
|
||||||
this.attachedInfo});
|
this.order,
|
||||||
|
this.position,
|
||||||
|
this.leader,
|
||||||
|
this.status,
|
||||||
|
this.createTime,
|
||||||
|
this.ex,
|
||||||
|
this.attachedInfo,
|
||||||
|
this.departmentName,
|
||||||
|
this.parentDepartmentList,
|
||||||
|
});
|
||||||
|
|
||||||
DeptMemberInfo.fromJson(Map<String, dynamic> json) {
|
DeptMemberInfo.fromJson(Map<String, dynamic> json) {
|
||||||
userID = json['userID'];
|
userID = json['userID'];
|
||||||
@@ -121,6 +186,13 @@ class DeptMemberInfo {
|
|||||||
createTime = json['createTime'];
|
createTime = json['createTime'];
|
||||||
ex = json['ex'];
|
ex = json['ex'];
|
||||||
attachedInfo = json['attachedInfo'];
|
attachedInfo = json['attachedInfo'];
|
||||||
|
departmentName = json['departmentName'];
|
||||||
|
if (json['parentDepartmentList'] != null) {
|
||||||
|
parentDepartmentList = <DeptInfo>[];
|
||||||
|
json['parentDepartmentList'].forEach((v) {
|
||||||
|
parentDepartmentList!.add(DeptInfo.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@@ -142,6 +214,11 @@ class DeptMemberInfo {
|
|||||||
data['createTime'] = this.createTime;
|
data['createTime'] = this.createTime;
|
||||||
data['ex'] = this.ex;
|
data['ex'] = this.ex;
|
||||||
data['attachedInfo'] = this.attachedInfo;
|
data['attachedInfo'] = this.attachedInfo;
|
||||||
|
data['departmentName'] = this.departmentName;
|
||||||
|
if (this.parentDepartmentList != null) {
|
||||||
|
data['parentDepartmentList'] =
|
||||||
|
this.parentDepartmentList!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,7 +235,10 @@ class DeptMemberInfo {
|
|||||||
|
|
||||||
/// 用户所在的部门
|
/// 用户所在的部门
|
||||||
class UserInDept {
|
class UserInDept {
|
||||||
|
/// 部门信息
|
||||||
DeptInfo? department;
|
DeptInfo? department;
|
||||||
|
|
||||||
|
/// 所在部门自己的信息
|
||||||
DeptMemberInfo? member;
|
DeptMemberInfo? member;
|
||||||
|
|
||||||
UserInDept({this.department, this.member});
|
UserInDept({this.department, this.member});
|
||||||
@@ -185,10 +265,20 @@ class UserInDept {
|
|||||||
|
|
||||||
/// 部门下的子部门跟员工
|
/// 部门下的子部门跟员工
|
||||||
class DeptMemberAndSubDept {
|
class DeptMemberAndSubDept {
|
||||||
|
/// 一级子部门
|
||||||
List<DeptInfo>? departmentList;
|
List<DeptInfo>? departmentList;
|
||||||
|
|
||||||
|
/// 一级成员
|
||||||
List<DeptMemberInfo>? departmentMemberList;
|
List<DeptMemberInfo>? departmentMemberList;
|
||||||
|
|
||||||
DeptMemberAndSubDept({this.departmentList, this.departmentMemberList});
|
/// 当前部门的所有上一级部门
|
||||||
|
List<DeptInfo>? parentDepartmentList;
|
||||||
|
|
||||||
|
DeptMemberAndSubDept({
|
||||||
|
this.departmentList,
|
||||||
|
this.departmentMemberList,
|
||||||
|
this.parentDepartmentList,
|
||||||
|
});
|
||||||
|
|
||||||
DeptMemberAndSubDept.fromJson(Map<String, dynamic> json) {
|
DeptMemberAndSubDept.fromJson(Map<String, dynamic> json) {
|
||||||
if (json['departmentList'] != null) {
|
if (json['departmentList'] != null) {
|
||||||
@@ -203,6 +293,58 @@ class DeptMemberAndSubDept {
|
|||||||
departmentMemberList!.add(DeptMemberInfo.fromJson(v));
|
departmentMemberList!.add(DeptMemberInfo.fromJson(v));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (json['parentDepartmentList'] != null) {
|
||||||
|
parentDepartmentList = <DeptInfo>[];
|
||||||
|
json['parentDepartmentList'].forEach((v) {
|
||||||
|
parentDepartmentList!.add(DeptInfo.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final data = Map<String, dynamic>();
|
||||||
|
if (this.departmentList != null) {
|
||||||
|
data['departmentList'] =
|
||||||
|
this.departmentList!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
if (this.departmentMemberList != null) {
|
||||||
|
data['departmentMemberList'] =
|
||||||
|
this.departmentMemberList!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
if (this.parentDepartmentList != null) {
|
||||||
|
data['parentDepartmentList'] =
|
||||||
|
this.parentDepartmentList!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 搜索结果
|
||||||
|
class OrganizationSearchResult {
|
||||||
|
/// 部门列表
|
||||||
|
List<DeptInfo>? departmentList;
|
||||||
|
|
||||||
|
/// 部门成员列表
|
||||||
|
List<DeptMemberInfo>? departmentMemberList;
|
||||||
|
|
||||||
|
OrganizationSearchResult({
|
||||||
|
this.departmentList,
|
||||||
|
this.departmentMemberList,
|
||||||
|
});
|
||||||
|
|
||||||
|
OrganizationSearchResult.fromJson(Map<String, dynamic> json) {
|
||||||
|
if (json['departmentList'] != null) {
|
||||||
|
departmentList = <DeptInfo>[];
|
||||||
|
json['departmentList'].forEach((v) {
|
||||||
|
departmentList!.add(DeptInfo.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (json['departmentMemberList'] != null) {
|
||||||
|
departmentMemberList = <DeptMemberInfo>[];
|
||||||
|
json['departmentMemberList'].forEach((v) {
|
||||||
|
departmentMemberList!.add(DeptMemberInfo.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
|||||||
class SearchResult {
|
class SearchResult {
|
||||||
/// 获取到的总的消息数量
|
/// 获取到的总的消息数量
|
||||||
int? totalCount;
|
int? totalCount;
|
||||||
|
|
||||||
|
/// 搜索到的具体内容
|
||||||
List<SearchResultItems>? searchResultItems;
|
List<SearchResultItems>? searchResultItems;
|
||||||
|
|
||||||
SearchResult({this.totalCount, this.searchResultItems});
|
SearchResult({this.totalCount, this.searchResultItems});
|
||||||
@@ -34,7 +36,11 @@ class SearchResultItems {
|
|||||||
|
|
||||||
/// 会话类型1单聊,2群聊,3,超级大群,4通知会话
|
/// 会话类型1单聊,2群聊,3,超级大群,4通知会话
|
||||||
int? conversationType;
|
int? conversationType;
|
||||||
|
|
||||||
|
/// 显示名
|
||||||
String? showName;
|
String? showName;
|
||||||
|
|
||||||
|
/// 头像
|
||||||
String? faceURL;
|
String? faceURL;
|
||||||
|
|
||||||
/// 搜索到的这个会话下的消息数量
|
/// 搜索到的这个会话下的消息数量
|
||||||
|
|||||||
@@ -1,8 +1,15 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
|
|
||||||
class SignalingInfo {
|
class SignalingInfo {
|
||||||
|
/// 操作者
|
||||||
String? opUserID;
|
String? opUserID;
|
||||||
|
|
||||||
|
/// 邀请信息
|
||||||
InvitationInfo? invitation;
|
InvitationInfo? invitation;
|
||||||
|
|
||||||
|
/// 离线显示内容
|
||||||
OfflinePushInfo? offlinePushInfo;
|
OfflinePushInfo? offlinePushInfo;
|
||||||
|
|
||||||
SignalingInfo({
|
SignalingInfo({
|
||||||
@@ -31,14 +38,32 @@ class SignalingInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class InvitationInfo {
|
class InvitationInfo {
|
||||||
String? inviterUserID; //邀请者UserID
|
/// 邀请者UserID
|
||||||
List<String>? inviteeUserIDList; //被邀请者UserID列表,如果是单聊只有一个元素
|
String? inviterUserID;
|
||||||
String? groupID; //如果是单聊,为""
|
|
||||||
String? roomID; //房间ID,必须唯一,可以不设置。
|
/// 被邀请者UserID列表,如果是单聊只有一个元素
|
||||||
int? timeout; //邀请超时时间(秒)
|
List<String>? inviteeUserIDList;
|
||||||
String? mediaType; //video 或者audio
|
|
||||||
int? sessionType; //1为单聊,2为群聊
|
/// 如果是单聊,为""
|
||||||
int? platformID; //和之前定义一致
|
String? groupID;
|
||||||
|
|
||||||
|
/// 房间ID,必须唯一,可以不设置。
|
||||||
|
String? roomID;
|
||||||
|
|
||||||
|
/// 邀请超时时间(秒)
|
||||||
|
int? timeout;
|
||||||
|
|
||||||
|
/// 发起时间
|
||||||
|
int? initiateTime;
|
||||||
|
|
||||||
|
/// video 或者 audio
|
||||||
|
String? mediaType;
|
||||||
|
|
||||||
|
/// [ConversationType]1为单聊,2为群聊
|
||||||
|
int? sessionType;
|
||||||
|
|
||||||
|
/// 平台[Platform]
|
||||||
|
int? platformID;
|
||||||
|
|
||||||
InvitationInfo(
|
InvitationInfo(
|
||||||
{this.inviterUserID,
|
{this.inviterUserID,
|
||||||
@@ -46,6 +71,7 @@ class InvitationInfo {
|
|||||||
this.groupID,
|
this.groupID,
|
||||||
this.roomID,
|
this.roomID,
|
||||||
this.timeout,
|
this.timeout,
|
||||||
|
this.initiateTime,
|
||||||
this.mediaType,
|
this.mediaType,
|
||||||
this.sessionType,
|
this.sessionType,
|
||||||
this.platformID});
|
this.platformID});
|
||||||
@@ -56,6 +82,7 @@ class InvitationInfo {
|
|||||||
groupID = json['groupID'];
|
groupID = json['groupID'];
|
||||||
roomID = json['roomID'];
|
roomID = json['roomID'];
|
||||||
timeout = json['timeout'];
|
timeout = json['timeout'];
|
||||||
|
initiateTime = json['initiateTime'];
|
||||||
mediaType = json['mediaType'];
|
mediaType = json['mediaType'];
|
||||||
sessionType = json['sessionType'];
|
sessionType = json['sessionType'];
|
||||||
platformID = json['platformID'];
|
platformID = json['platformID'];
|
||||||
@@ -68,6 +95,7 @@ class InvitationInfo {
|
|||||||
data['groupID'] = this.groupID;
|
data['groupID'] = this.groupID;
|
||||||
data['roomID'] = this.roomID;
|
data['roomID'] = this.roomID;
|
||||||
data['timeout'] = this.timeout;
|
data['timeout'] = this.timeout;
|
||||||
|
data['initiateTime'] = this.initiateTime;
|
||||||
data['mediaType'] = this.mediaType;
|
data['mediaType'] = this.mediaType;
|
||||||
data['sessionType'] = this.sessionType;
|
data['sessionType'] = this.sessionType;
|
||||||
data['platformID'] = this.platformID;
|
data['platformID'] = this.platformID;
|
||||||
@@ -75,9 +103,15 @@ class InvitationInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 信令凭证
|
||||||
class SignalingCertificate {
|
class SignalingCertificate {
|
||||||
|
/// 登录token
|
||||||
String? token;
|
String? token;
|
||||||
|
|
||||||
|
/// 房间id
|
||||||
String? roomID;
|
String? roomID;
|
||||||
|
|
||||||
|
/// 服务器地址
|
||||||
String? liveURL;
|
String? liveURL;
|
||||||
|
|
||||||
SignalingCertificate({this.token, this.roomID, this.liveURL});
|
SignalingCertificate({this.token, this.roomID, this.liveURL});
|
||||||
|
|||||||
@@ -5,30 +5,54 @@
|
|||||||
/// Not a friend is not on the blacklist
|
/// Not a friend is not on the blacklist
|
||||||
/// 不是好友不在黑名单
|
/// 不是好友不在黑名单
|
||||||
class UserInfo {
|
class UserInfo {
|
||||||
|
/// 用户id
|
||||||
String? userID;
|
String? userID;
|
||||||
|
|
||||||
|
/// 用户昵称
|
||||||
String? nickname;
|
String? nickname;
|
||||||
|
|
||||||
|
/// 头像
|
||||||
String? faceURL;
|
String? faceURL;
|
||||||
|
|
||||||
|
/// 性别
|
||||||
int? gender;
|
int? gender;
|
||||||
|
|
||||||
|
/// 手机号
|
||||||
String? phoneNumber;
|
String? phoneNumber;
|
||||||
|
|
||||||
|
/// 出生时间
|
||||||
int? birth;
|
int? birth;
|
||||||
|
|
||||||
|
/// 邮箱
|
||||||
String? email;
|
String? email;
|
||||||
|
|
||||||
|
/// 扩展字段
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
|
/// 创建时间
|
||||||
int? createTime;
|
int? createTime;
|
||||||
|
|
||||||
|
/// 备注
|
||||||
String? remark;
|
String? remark;
|
||||||
|
|
||||||
/// User's public profile(用户公开的资料)
|
/// 用户公开的资料
|
||||||
PublicUserInfo? publicInfo;
|
PublicUserInfo? publicInfo;
|
||||||
|
|
||||||
/// Only friends can view information(好友才能查看的资料)
|
/// 好友才能查看的资料
|
||||||
FriendInfo? friendInfo;
|
FriendInfo? friendInfo;
|
||||||
|
|
||||||
/// blacklist information(黑名单资料)
|
/// 黑名单资料
|
||||||
BlacklistInfo? blackInfo;
|
BlacklistInfo? blackInfo;
|
||||||
|
|
||||||
|
/// 是否好友关系
|
||||||
bool? isFriendship;
|
bool? isFriendship;
|
||||||
|
|
||||||
|
/// 是否黑名单
|
||||||
bool? isBlacklist;
|
bool? isBlacklist;
|
||||||
|
|
||||||
|
/// 全局免打扰 0:正常;1:不接受消息;2:接受在线消息不接受离线消息;
|
||||||
|
int? globalRecvMsgOpt;
|
||||||
|
|
||||||
UserInfo({
|
UserInfo({
|
||||||
this.publicInfo,
|
this.publicInfo,
|
||||||
this.friendInfo,
|
this.friendInfo,
|
||||||
@@ -46,6 +70,7 @@ class UserInfo {
|
|||||||
this.ex,
|
this.ex,
|
||||||
this.createTime,
|
this.createTime,
|
||||||
this.remark,
|
this.remark,
|
||||||
|
this.globalRecvMsgOpt,
|
||||||
});
|
});
|
||||||
|
|
||||||
// UserInfo.self(Map<String, dynamic> json) {
|
// UserInfo.self(Map<String, dynamic> json) {
|
||||||
@@ -84,6 +109,7 @@ class UserInfo {
|
|||||||
remark = json['remark'] ?? _remark;
|
remark = json['remark'] ?? _remark;
|
||||||
ex = json['ex'] ?? _ex;
|
ex = json['ex'] ?? _ex;
|
||||||
createTime = json['createTime'];
|
createTime = json['createTime'];
|
||||||
|
globalRecvMsgOpt = json['globalRecvMsgOpt'];
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@@ -104,6 +130,7 @@ class UserInfo {
|
|||||||
data['ex'] = this.ex;
|
data['ex'] = this.ex;
|
||||||
data['createTime'] = this.createTime;
|
data['createTime'] = this.createTime;
|
||||||
data['remark'] = this.remark;
|
data['remark'] = this.remark;
|
||||||
|
data['globalRecvMsgOpt'] = this.globalRecvMsgOpt;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,12 +186,24 @@ class UserInfo {
|
|||||||
int get hashCode => userID.hashCode;
|
int get hashCode => userID.hashCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 公开的资料
|
||||||
class PublicUserInfo {
|
class PublicUserInfo {
|
||||||
|
/// 用户id
|
||||||
String? userID;
|
String? userID;
|
||||||
|
|
||||||
|
/// 昵称
|
||||||
String? nickname;
|
String? nickname;
|
||||||
|
|
||||||
|
/// 头像
|
||||||
String? faceURL;
|
String? faceURL;
|
||||||
|
|
||||||
|
/// 性别
|
||||||
int? gender;
|
int? gender;
|
||||||
|
|
||||||
|
/// AppOrdinaryUsers = 1 AppAdmin = 2
|
||||||
int? appMangerLevel;
|
int? appMangerLevel;
|
||||||
|
|
||||||
|
/// 扩展信息
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
PublicUserInfo({
|
PublicUserInfo({
|
||||||
@@ -197,18 +236,42 @@ class PublicUserInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 好友信息
|
||||||
class FriendInfo {
|
class FriendInfo {
|
||||||
|
/// 用户id
|
||||||
String? userID;
|
String? userID;
|
||||||
|
|
||||||
|
/// 昵称
|
||||||
String? nickname;
|
String? nickname;
|
||||||
|
|
||||||
|
/// 头像
|
||||||
String? faceURL;
|
String? faceURL;
|
||||||
|
|
||||||
|
/// 性别
|
||||||
int? gender;
|
int? gender;
|
||||||
|
|
||||||
|
/// 手机号
|
||||||
String? phoneNumber;
|
String? phoneNumber;
|
||||||
|
|
||||||
|
/// 出生日期
|
||||||
int? birth;
|
int? birth;
|
||||||
|
|
||||||
|
/// 邮箱
|
||||||
String? email;
|
String? email;
|
||||||
|
|
||||||
|
/// 备注
|
||||||
String? remark;
|
String? remark;
|
||||||
|
|
||||||
|
/// 扩展字段
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
|
/// 创建时间
|
||||||
int? createTime;
|
int? createTime;
|
||||||
|
|
||||||
|
/// 添加方式
|
||||||
int? addSource;
|
int? addSource;
|
||||||
|
|
||||||
|
/// 操作者id
|
||||||
String? operatorUserID;
|
String? operatorUserID;
|
||||||
|
|
||||||
FriendInfo({
|
FriendInfo({
|
||||||
@@ -261,14 +324,30 @@ class FriendInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 黑名单信息
|
||||||
class BlacklistInfo {
|
class BlacklistInfo {
|
||||||
|
/// 用户id
|
||||||
String? userID;
|
String? userID;
|
||||||
|
|
||||||
|
/// 昵称
|
||||||
String? nickname;
|
String? nickname;
|
||||||
|
|
||||||
|
/// 头像
|
||||||
String? faceURL;
|
String? faceURL;
|
||||||
|
|
||||||
|
/// 性别
|
||||||
int? gender;
|
int? gender;
|
||||||
|
|
||||||
|
/// 创建时间
|
||||||
int? createTime;
|
int? createTime;
|
||||||
|
|
||||||
|
/// 添加方式
|
||||||
int? addSource;
|
int? addSource;
|
||||||
|
|
||||||
|
/// 操作者
|
||||||
String? operatorUserID;
|
String? operatorUserID;
|
||||||
|
|
||||||
|
/// 扩展信息
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
BlacklistInfo({
|
BlacklistInfo({
|
||||||
@@ -307,10 +386,11 @@ class BlacklistInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 关系
|
||||||
class FriendshipInfo {
|
class FriendshipInfo {
|
||||||
|
/// 用户id
|
||||||
String? userID;
|
String? userID;
|
||||||
|
|
||||||
/// 1 means friend (and not blacklist)
|
|
||||||
/// 1表示好友(并且不是黑名单)
|
/// 1表示好友(并且不是黑名单)
|
||||||
int? result;
|
int? result;
|
||||||
|
|
||||||
@@ -329,21 +409,51 @@ class FriendshipInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 好友申请信息
|
||||||
class FriendApplicationInfo {
|
class FriendApplicationInfo {
|
||||||
|
/// 发起者用户id
|
||||||
String? fromUserID;
|
String? fromUserID;
|
||||||
|
|
||||||
|
/// 发起者用户昵称
|
||||||
String? fromNickname;
|
String? fromNickname;
|
||||||
|
|
||||||
|
/// 发起者用户头像
|
||||||
String? fromFaceURL;
|
String? fromFaceURL;
|
||||||
|
|
||||||
|
/// 发起者性别
|
||||||
int? fromGender;
|
int? fromGender;
|
||||||
|
|
||||||
|
/// 接收者用户id
|
||||||
String? toUserID;
|
String? toUserID;
|
||||||
|
|
||||||
|
/// 接收者用户昵称
|
||||||
String? toNickname;
|
String? toNickname;
|
||||||
|
|
||||||
|
/// 接收者头像
|
||||||
String? toFaceURL;
|
String? toFaceURL;
|
||||||
|
|
||||||
|
/// 接收者性别
|
||||||
int? toGender;
|
int? toGender;
|
||||||
|
|
||||||
|
/// 处理结果
|
||||||
int? handleResult;
|
int? handleResult;
|
||||||
|
|
||||||
|
/// 请求消息
|
||||||
String? reqMsg;
|
String? reqMsg;
|
||||||
|
|
||||||
|
/// 创建时间
|
||||||
int? createTime;
|
int? createTime;
|
||||||
|
|
||||||
|
/// 处理者id
|
||||||
String? handlerUserID;
|
String? handlerUserID;
|
||||||
|
|
||||||
|
/// 处理备注
|
||||||
String? handleMsg;
|
String? handleMsg;
|
||||||
|
|
||||||
|
/// 处理时间
|
||||||
int? handleTime;
|
int? handleTime;
|
||||||
|
|
||||||
|
/// 扩展字段
|
||||||
String? ex;
|
String? ex;
|
||||||
|
|
||||||
FriendApplicationInfo(
|
FriendApplicationInfo(
|
||||||
@@ -401,12 +511,12 @@ class FriendApplicationInfo {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// friend application waiting handle
|
/// 等待处理
|
||||||
bool get isWaitingHandle => handleResult == 0;
|
bool get isWaitingHandle => handleResult == 0;
|
||||||
|
|
||||||
/// friend application agreed
|
/// 已同意
|
||||||
bool get isAgreed => handleResult == 1;
|
bool get isAgreed => handleResult == 1;
|
||||||
|
|
||||||
/// friend application rejected
|
/// 已拒绝
|
||||||
bool get isRejected => handleResult == -1;
|
bool get isRejected => handleResult == -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||||
|
|
||||||
class OpenIM {
|
class OpenIM {
|
||||||
static const MethodChannel _channel =
|
static const version = '2.1.0';
|
||||||
const MethodChannel('flutter_openim_sdk');
|
|
||||||
|
|
||||||
static IMManager iMManager = IMManager(_channel);
|
static const _channel = const MethodChannel('flutter_openim_sdk');
|
||||||
|
|
||||||
|
static final iMManager = IMManager(_channel);
|
||||||
|
|
||||||
OpenIM._();
|
OpenIM._();
|
||||||
}
|
}
|
||||||
|
|||||||
23
pubspec.lock
23
pubspec.lock
@@ -42,14 +42,14 @@ packages:
|
|||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.16.0"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.0"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -73,7 +73,7 @@ packages:
|
|||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.3"
|
version: "0.1.4"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -87,7 +87,7 @@ packages:
|
|||||||
name: path
|
name: path
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.1"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -99,7 +99,7 @@ packages:
|
|||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.2"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -134,21 +134,14 @@ packages:
|
|||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.8"
|
version: "0.4.9"
|
||||||
typed_data:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: typed_data
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.0"
|
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.14.0 <3.0.0"
|
dart: ">=2.17.0-0 <3.0.0"
|
||||||
flutter: ">=1.20.0"
|
flutter: ">=1.20.0"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: flutter_openim_sdk
|
name: flutter_openim_sdk
|
||||||
description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
|
description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
|
||||||
version: 2.0.9
|
version: 2.1.0+1
|
||||||
homepage: https://www.rentsoft.cn
|
homepage: https://www.rentsoft.cn
|
||||||
repository: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter
|
repository: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user