Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
离线图片消息缺少 localThumbailPath
  • Loading branch information
lhw5123 committed May 19, 2017
1 parent fd3c0dd commit ff78445
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JMessage PhoneGap / Cordova Plugin

[![release](https://img.shields.io/badge/release-2.3.9-blue.svg)](https://github.com/jpush/jmessage-phonegap-plugin/releases)
[![release](https://img.shields.io/badge/release-2.4.0-blue.svg)](https://github.com/jpush/jmessage-phonegap-plugin/releases)
[![platforms](https://img.shields.io/badge/platforms-iOS%7CAndroid-lightgrey.svg)](https://github.com/jpush/jmessage-phonegap-plugin)
[![QQ Group](https://img.shields.io/badge/QQ%20Group-413602425-red.svg)](https://github.com/jpush/jmessage-phonegap-plugin)
[![weibo](https://img.shields.io/badge/weibo-JPush-blue.svg)](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jmessage-phonegap-plugin",
"version": "2.3.9",
"version": "2.4.0",
"description": "JMessage Cordova Plugin.",
"cordova": {
"id": "jmessage-phonegap-plugin",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="jmessage-phonegap-plugin"
version="2.3.9">
version="2.4.0">

<name>JMessage</name>
<description>集成极光 IM 和推送功能</description>
Expand Down
8 changes: 4 additions & 4 deletions src/android/JMessagePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -2967,10 +2967,10 @@ private JSONObject getMessageJSONObject(Message msg) throws JSONException {
switch (msg.getContentType()) {
case image:
ImageContent imageContent = (ImageContent) msg.getContent();
String imgPath = imageContent.getLocalPath();
String imgLink = imageContent.getImg_link();
msgJson.getJSONObject("content").put("imagePath", imgPath);
msgJson.getJSONObject("content").put("imageLink", imgLink);
if (!msgJson.getJSONObject("content").has("localThumbnailPath")) {
msgJson.getJSONObject("content").put("localThumbnailPath",
imageContent.getLocalThumbnailPath());
}
break;
case voice:
VoiceContent voiceContent = (VoiceContent) msg.getContent();
Expand Down

0 comments on commit ff78445

Please sign in to comment.