upgrade sdk, new add quote message

This commit is contained in:
hrxiang
2021-08-31 11:27:01 +08:00
parent 6b534b2fb0
commit 00e19f25c6
4 changed files with 33 additions and 3 deletions

View File

@@ -1,7 +1,5 @@
package io.openim.flutter_openim_sdk.manager;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -230,6 +228,13 @@ public class MessageManager {
));
}
public void createQuoteMessage(MethodCall methodCall, MethodChannel.Result result) {
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createQuoteMessage(
CommonUtil.getQuoteMessageText(methodCall),
CommonUtil.getQuoteMessageBody(methodCall)
));
}
public void getTotalUnreadMsgCount(MethodCall methodCall, MethodChannel.Result result) {
Open_im_sdk.getTotalUnreadMsgCount(new BaseListener(result));
}

View File

@@ -284,6 +284,14 @@ public class CommonUtil {
return getParamValue(methodCall, KEY_CUSTOM_MESSAGE_EXT);
}
public static String getQuoteMessageText(MethodCall methodCall) {
return getParamValue(methodCall, KEY_QUOTE_MESSAGE_TEXT);
}
public static String getQuoteMessageBody(MethodCall methodCall) {
return getSDKJsonParam(methodCall, KEY_QUOTE_MESSAGE_BODY);
}
//login
final static String KEY_UID = "uid";
final static String KEY_TOKEN = "token";
@@ -308,6 +316,8 @@ public class CommonUtil {
final static String KEY_MESSAGE_DES = "description";
final static String KEY_CUSTOM_MESSAGE_DATA = "data";
final static String KEY_CUSTOM_MESSAGE_EXT = "extension";
final static String KEY_QUOTE_MESSAGE_TEXT = "quoteText";
final static String KEY_QUOTE_MESSAGE_BODY = "quoteMessage";
//send message
final static String KEY_SEND_MESSAGE_CONTENT = "message";
final static String KEY_SEND_MESSAGE_CONTENT_CLIENT_ID = "clientMsgID";