ImControlPlane class

SY IM 控制面 REST(非 OpenIM 原生 SDK)。

  • getToken → /api/user/im/token 或 /api/server/im/token
  • friends / groups / send / history / revoke → /api/user/im/*

已读、总未读、好友申请同意/拒绝、群成员管理走登录后的 OpenIM 实时接口 (OpenIMAdapter)。本类只覆盖控制面 REST,原有路径保持不变。

Constructors

ImControlPlane({required String apiBaseUrl, required String appId, String? userJwt, String? appSecret})

Properties

apiBaseUrl → String
final
appId → String
final
appSecret ↔ String?
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
userJwt ↔ String?
getter/setter pair

Methods

addConversationsToTag({required String ownerUserId, required int tagId, required List<String> conversationIds}) → Future<Map<String, dynamic>>
把会话加入标签。
addFriend({required String fromUserId, required String toUserId, String reqMsg = ''}) → Future<Map<String, dynamic>>
createConversationTag({required String ownerUserId, required String name, String color = '', String remark = ''}) → Future<Map<String, dynamic>>
新建会话标签(每个用户自己的分组,存在 SY 服务端)。返回值含 tag。
createGroup({required String ownerUserId, required String groupName, List<String> memberUserIds = const []}) → Future<Map<String, dynamic>>
deleteConversationTag({required String ownerUserId, required int tagId}) → Future<Map<String, dynamic>>
删除会话标签。
getToken({required String userId}) → Future<Map<String, dynamic>>
history({required String userId, String? conversationId, String? peerUserId, String? groupId, int count = 20}) → Future<Map<String, dynamic>>
listConversationTags({required String ownerUserId}) → Future<Map<String, dynamic>>
列出会话标签。list 每项含 id / name / memberCount / members。
listFriends({required String ownerUserId}) → Future<Map<String, dynamic>>
listGroups({required String ownerUserId}) → Future<Map<String, dynamic>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reactToMessage({required String fromUserId, required String emoji, String? toUserId, String? groupId, String? targetClientMsgId, int targetSeq = 0, String? targetSenderId, bool add = true}) → Future<Map<String, dynamic>>
对一条消息加 / 取消表情回应。POST /api/user/im/reaction。
removeConversationsFromTag({required String ownerUserId, required int tagId, required List<String> conversationIds}) → Future<Map<String, dynamic>>
把会话移出标签。
reportGroupMessagesRead({required String userId, required String conversationId, required List<int> seqs}) → Future<Map<String, dynamic>>
把本端已读的群消息写入控制面花名册。POST /api/user/im/conversations/mark-read, mode=msgs + seqs;服务端同时向 OpenIM 标记这些消息已读。
revoke({required String userId, required String conversationId, required int seq}) → Future<Map<String, dynamic>>
send({required String fromUserId, String? toUserId, String? groupId, String contentType = 'text', required dynamic content}) → Future<Map<String, dynamic>>
toString() → String
A string representation of this object.
inherited
whoRead({required String conversationId, int seq = 0}) → Future<List<String>>
控制面已读花名册。POST /api/user/im/messages/who-read,body {appId, conversationId, seq}。 返回去重后的已读者(最近已读在前)。只含调用过 reportGroupMessagesRead 的成员。

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

whoReadBody(String appId, String conversationId, int seq) → Map<String, dynamic>
who-read 请求体(与服务端 WhoReadReq 一致)。