解决Server SDK发送引用消息客户端无法正确解析的问题

This commit is contained in:
heavyrian2012
2025-09-20 09:41:29 +08:00
parent 3bb23f92c4
commit 70cf65f0c0
@@ -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");
}
} }
} }