@@ -72,12 +72,20 @@ void onHandleMsg(Object msgInfoBean) {
72
72
if (msgInfoBean .isSend () && msgInfoBean .isQuote ()) {
73
73
String talker = msgInfoBean .getTalker ();
74
74
String title = msgInfoBean .getQuoteMsg ().getTitle ();
75
- if (title .contains ("/q" )) {
75
+ if (title .startsWith ("/q" )) {
76
76
String quoteMsgSendTalker = msgInfoBean .getQuoteMsg ().getSendTalker ();
77
77
String quoteMsgAvatarUrl = getAvatarUrl (quoteMsgSendTalker );
78
78
String quoteMsgDisplayName = msgInfoBean .getQuoteMsg ().getDisplayName ();
79
- String quoteMsgType = msgInfoBean .getQuoteMsg ().getType ();
80
- String quoteMsgContent = quoteMsgType .equals ("1" ) ? msgInfoBean .getQuoteMsg ().getContent () : "暂不支持的引用类型" ;
79
+
80
+ String [] parts = title .split (" " , 2 );
81
+ String quoteMsgContent ;
82
+ if (parts .length > 1 ) {
83
+ quoteMsgContent = parts [1 ];
84
+ } else {
85
+ String quoteMsgType = msgInfoBean .getQuoteMsg ().getType ();
86
+ quoteMsgContent = quoteMsgType .equals ("1" ) ? msgInfoBean .getQuoteMsg ().getContent () : "暂不支持的引用类型" ;
87
+ }
88
+
81
89
if (!quoteMsgAvatarUrl .equals ("" )) {
82
90
String avatarTmpPath = pluginDir + "/avatar.png" ;
83
91
String messageTmpPath = pluginDir + "/message.png" ;
@@ -88,7 +96,7 @@ public void onSuccess(File file) {
88
96
new File (avatarTmpPath ).delete ();
89
97
new File (messageTmpPath ).delete ();
90
98
}
91
-
99
+
92
100
public void onError (Exception e ) {
93
101
sendText (talker , "下载头像异常:" + e .getMessage ());
94
102
}
0 commit comments