Skip to content

Commit

Permalink
🔖 RELEASE v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MisakaTAT committed Aug 1, 2024
1 parent bc95115 commit 161d1a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/mikuac/shiro/action/GoCQHTTPExtend.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ public interface GoCQHTTPExtend {

/**
* 获取版本信息
*
* @return result {@link ActionList} of {@link VersionInfoResp}
*/
public ActionData<VersionInfoResp> getVersionInfo();
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/mikuac/shiro/common/utils/ShiroUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,17 @@ public static List<Map<String, Object>> generateForwardMsg(String uin, String na
*/
@SuppressWarnings("Duplicates")
public static List<Map<String, Object>> generateForwardMsg(Bot bot, List<?> contents) {
List<Map<String, Object>> nodes = new ArrayList();
contents.forEach((msg) -> {
Map<String, Object> node = new HashMap();
List<Map<String, Object>> nodes = new ArrayList<>();
contents.forEach(msg -> {
Map<String, Object> node = new HashMap<>();
node.put("type", "node");
Map<String, Object> data = new HashMap();
Map<String, Object> data = new HashMap<>();
data.put("name", bot.getLoginInfo().getData().getNickname());
String appName = bot.getVersionInfo().getData().getAppName();
//兼容Lagrange
if (appName.equals("Lagrange.OneBot")){
// 兼容Lagrange
if (appName.equals("Lagrange.OneBot")) {
data.put("uin", String.valueOf(bot.getSelfId()));
}else {
} else {
data.put("uin", bot.getSelfId());
}
data.put("content", msg);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/mikuac/shiro/core/Bot.java
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ public ActionList<GroupMemberInfoResp> getGroupMemberList(long groupId, boolean
/**
* https://docs.go-cqhttp.org/api/#%E8%8E%B7%E5%8F%96%E7%89%88%E6%9C%AC%E4%BF%A1%E6%81%AF
* 获取版本信息
*
* @return result {@link ActionData} of {@link VersionInfoResp}
*/
@Override
Expand Down

0 comments on commit 161d1a7

Please sign in to comment.