Skip to content
Merged

Alpha #397

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private void recallMessage(JSONObject param, String channelName, Result result)
if (msg != null) {
EMClient.getInstance().chatManager().recallMessage(msg);
}
onSuccess(result, channelName, true);
onSuccess(result, channelName, true);
} catch (HyphenateException e) {
onError(result, e);
}
Expand Down Expand Up @@ -306,12 +306,14 @@ public void onProgress(int progress, String status) {

@Override
public void onError(int code, String desc) {
Map<String, Object> data = new HashMap<>();
data.put("code", code);
data.put("description", desc);
post(() -> {
Map<String, Object> map = new HashMap<>();
map.put("message", EMMessageHelper.toJson(msg));
map.put("localTime", msg.localTime());
map.put("code", code);
map.put("description", desc);
map.put("error", data);
messageChannel.invokeMethod(EMSDKMethod.onMessageError, map);
});
}
Expand Down Expand Up @@ -348,12 +350,14 @@ public void onProgress(int progress, String status) {

@Override
public void onError(int code, String desc) {
Map<String, Object> data = new HashMap<>();
data.put("code", code);
data.put("description", desc);
post(() -> {
Map<String, Object> map = new HashMap<>();
map.put("message", EMMessageHelper.toJson(msg));
map.put("localTime", msg.localTime());
map.put("code", code);
map.put("description", desc);
map.put("error", data);
messageChannel.invokeMethod(EMSDKMethod.onMessageError, map);
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.easemob.im_flutter_sdk;

import android.text.TextUtils;

import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
Expand Down