Compare commits
3 Commits
0.0.40
...
74aa08a4b5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74aa08a4b5 | ||
|
|
39fb9b5cb3 | ||
|
|
6bcf3de467 |
@@ -69,5 +69,5 @@ android {
|
||||
|
||||
dependencies {
|
||||
//implementation 'com.openim:sdkcore:1.0.15-local'
|
||||
implementation 'com.openim:sdkcore:1.0.22'
|
||||
implementation 'com.openim:sdkcore:1.0.24'
|
||||
}
|
||||
@@ -100,4 +100,14 @@ public class ChannelManager extends BaseManager {
|
||||
jsonValue(methodCall, "userIDs")
|
||||
);
|
||||
}
|
||||
|
||||
public void getChannelHistoryMessages(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getChannelHistoryMessages(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "channelID"),
|
||||
value(methodCall, "count"),
|
||||
int2long(methodCall, "sinceSeq")
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ public class ChannelManager: BaseServiceManager {
|
||||
|
||||
|
||||
self["getUsersInChannel"] = getUsersInChannel
|
||||
self["getChannelHistoryMessages"] = getChannelHistoryMessages
|
||||
self["isJoinChannel"] = isJoinChannel
|
||||
self["joinChannel"] = joinChannel
|
||||
self["quitChannel"] = quitChannel
|
||||
@@ -50,6 +51,10 @@ public class ChannelManager: BaseServiceManager {
|
||||
methodCall[jsonString: "userIDs"])
|
||||
}
|
||||
|
||||
func getChannelHistoryMessages(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkGetChannelHistoryMessages(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "channelID"], methodCall[int: "count"], methodCall[int64: "sinceSeq"])
|
||||
}
|
||||
|
||||
func isJoinChannel(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkIsJoinChannel(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "channelID"])
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'flutter_openim_sdk'
|
||||
s.version = '0.0.16'
|
||||
s.version = '0.0.18'
|
||||
s.summary = 'A new Flutter project.'
|
||||
s.description = <<-DESC
|
||||
A new Flutter project.
|
||||
@@ -19,7 +19,7 @@ A new Flutter project.
|
||||
|
||||
#s.ios.vendored_frameworks = 'frameworks/*.xcframework'
|
||||
#s.vendored_frameworks = 'frameworks/*.xcframework'
|
||||
s.dependency 'openim_sdk_core_ios','0.16.0'
|
||||
s.dependency 'openim_sdk_core_ios','0.18.0'
|
||||
s.static_framework = true
|
||||
s.library = 'resolv'
|
||||
|
||||
|
||||
@@ -309,6 +309,25 @@ class ChannelManager {
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// Get channel short-term history messages
|
||||
/// [channelID] Channel ID
|
||||
/// [count] Number of messages to retrieve
|
||||
/// [sinceSeq] Internal sequence cursor for pagination (0 for first page)
|
||||
Future<dynamic> getChannelHistoryMessages({
|
||||
required String channelID,
|
||||
int count = 20,
|
||||
int sinceSeq = 0,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'getChannelHistoryMessages',
|
||||
_buildParam({
|
||||
'channelID': channelID,
|
||||
'count': count,
|
||||
'sinceSeq': sinceSeq,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
static Map _buildParam(Map<String, dynamic> param) {
|
||||
param["ManagerName"] = "channelManager";
|
||||
param = Utils.cleanMap(param);
|
||||
|
||||
Reference in New Issue
Block a user