解决Server SDK发送引用消息客户端无法正确解析的问题
This commit is contained in:
@@ -50,13 +50,18 @@ public class QuoteInfo {
|
|||||||
object.put("i", userId);
|
object.put("i", userId);
|
||||||
object.put("n", userDisplayName);
|
object.put("n", userDisplayName);
|
||||||
object.put("d", messageDigest);
|
object.put("d", messageDigest);
|
||||||
return object;
|
JSONObject quote = new JSONObject();
|
||||||
|
quote.put("quote", object);
|
||||||
|
return quote;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void decode(JSONObject object) {
|
public void decode(JSONObject object) {
|
||||||
messageUid = (long) object.get("u");
|
JSONObject quote = (JSONObject)object.get("quote");
|
||||||
userId = (String) object.get("i");
|
if(quote != null) {
|
||||||
userDisplayName = (String) object.get("n");
|
messageUid = (long) quote.get("u");
|
||||||
messageDigest = (String) object.get("d");
|
userId = (String) quote.get("i");
|
||||||
|
userDisplayName = (String) quote.get("n");
|
||||||
|
messageDigest = (String) quote.get("d");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user