更新测试

This commit is contained in:
cpdl
2025-02-27 17:41:33 +08:00
parent 58fa80a2f8
commit e13c4c6658
8 changed files with 129 additions and 6 deletions

View File

@@ -151,7 +151,8 @@ class MessageManager {
/// Typing status update
/// [msgTip] Custom content
@Deprecated('Use [OpenIM.iMManager.conversationManager.changeInputStates(conversationID:focus:)] instead')
@Deprecated(
'Use [OpenIM.iMManager.conversationManager.changeInputStates(conversationID:focus:)] instead')
Future typingStatusUpdate({
required String userID,
String? msgTip,
@@ -531,7 +532,8 @@ class MessageManager {
},
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toObj(value, (map) => SearchResult.fromJson(map)));
.then((value) =>
Utils.toObj(value, (map) => SearchResult.fromJson(map)));
/// Revoke a message
/// [message] The message to be revoked
@@ -548,6 +550,23 @@ class MessageManager {
"operationID": Utils.checkOperationID(operationID),
}));
/// Edit a message
/// [message] The message to be edited
Future editMessage({
required String conversationID,
required String clientMsgID,
String? operationID,
required String? content,
}) =>
_channel.invokeMethod(
'editMessage',
_buildParam({
'conversationID': conversationID,
'clientMsgID': clientMsgID,
"operationID": Utils.checkOperationID(operationID),
'content': content,
}));
/// Mark messages as read
/// [conversationID] Conversation ID
/// [messageIDList] List of clientMsgIDs of messages to be marked as read
@@ -587,7 +606,8 @@ class MessageManager {
'lastMinSeq': lastMinSeq ?? 0,
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toObj(value, (map) => AdvancedMessage.fromJson(map)));
.then((value) =>
Utils.toObj(value, (map) => AdvancedMessage.fromJson(map)));
/// Get chat history (newly received chat history after startMsg). Used for locating a specific message in global search and then fetching messages received after that message.
/// [conversationID] Conversation ID, can be used for querying notifications
@@ -610,7 +630,8 @@ class MessageManager {
'lastMinSeq': lastMinSeq ?? 0,
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toObj(value, (map) => AdvancedMessage.fromJson(map)));
.then((value) =>
Utils.toObj(value, (map) => AdvancedMessage.fromJson(map)));
/// Find message details
/// [conversationID] Conversation ID
@@ -626,7 +647,8 @@ class MessageManager {
'searchParams': searchParams.map((e) => e.toJson()).toList(),
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toObj(value, (map) => SearchResult.fromJson(map)));
.then((value) =>
Utils.toObj(value, (map) => SearchResult.fromJson(map)));
/// Rich text message
/// [text] Input content