Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
chore(kotlin, cpp): prepare v2.9.1
Browse files Browse the repository at this point in the history
Former-commit-id: ad631a1
  • Loading branch information
Nambers committed Jan 10, 2022
1 parent 6a9416b commit ca7f0e0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Change Log
## v2.9.1

+ mirai版本更新到v2.9.2
+ 内部优化 #106
+ 支持转发转发信息
+ 支持MessagePreSendEvent(但是还不支持中断或更改发送)
+ 支持注册命令(loader只支持控制台命令, plugin是对接mirai的命令系统的rawCommand)

## v2.9.0-M2

Expand Down
1 change: 1 addition & 0 deletions cpp/include/MessageChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ namespace MiraiCP {
if (origin)
j = tmp["originalMessage"];
MessageChain mc;
if (j.empty()) return mc;
if (j[0]["type"] == "MessageOrigin") {
mc.add(OnlineForwardedMessage::deserializationFromMessageSourceJson(j));
return mc;
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ JNIEXPORT jstring Event(JNIEnv *env, jobject, jstring content) {
// command
std::optional<Contact> c = std::nullopt;
if (j.contains("contact")) c = Contact::deserialize(j["contact"]);
CommandManager::commandManager[j["bindId"]]->onCommand(c, Bot(j["botid"]), MessageChain::deserializationFromMessageSourceJson(j["message"].get<std::string>(), false));
CommandManager::commandManager[j["bindId"]]->onCommand(c, Bot(j["botid"]), MessageChain::deserializationFromMessageSourceJson((j.contains("message") ? j["message"].get<std::string>() : ""), false));
break;
}
default:
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "CPPPlugin.h"

namespace MiraiCP {
const std::string MiraiCPVersion = "v2.9.0-M2";
const std::string MiraiCPVersion = "v2.9.1";
inline void schedule(long time, const std::string &msg, JNIEnv *env = nullptr);
void enrollPlugin();

Expand Down
2 changes: 1 addition & 1 deletion kotlin/buildSrc/src/main/kotlin/Version.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object Version {
const val `kotlinx-coroutines-core` = "1.6.0"

const val mirai = "2.9.2"
const val miraiCP = "2.9.0-M2"
const val miraiCP = "2.9.1"

const val shadowJar = "7.1.1"
const val mavenCenterPublish = "1.0.0-dev-1"
Expand Down

0 comments on commit ca7f0e0

Please sign in to comment.