Skip to content

Commit

Permalink
Merge pull request #543 from flowkscai/flutter2_stable
Browse files Browse the repository at this point in the history
fix: android side get reactions of message null pointer error
  • Loading branch information
dujiepeng committed Apr 19, 2023
2 parents a7bc427 + cac0919 commit 36473a0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ private void reactionList(JSONObject params, String channelName, MethodChannel.R
ArrayList<Map<String, Object>> list = new ArrayList<>();
if (msg != null) {
List<EMMessageReaction> reactions = msg.getMessageReaction();
for (int i = 0; i < reactions.size(); i++) {
list.add(EMMessageReactionHelper.toJson(reactions.get(i)));
if (reactions != null) {
for (int i = 0; i < reactions.size(); i++) {
list.add(EMMessageReactionHelper.toJson(reactions.get(i)));
}
}
}
onSuccess(result, channelName, list);
Expand Down

0 comments on commit 36473a0

Please sign in to comment.