Commit Graph

81 Commits

Author SHA1 Message Date
Karlatemp
ef439f1dea
Fix API check 2021-06-07 12:33:31 +08:00
Karlatemp
f03fe168fd
Fix binary-compatibility-validator 2021-06-07 12:16:58 +08:00
Him188
bcdff1336b
Kotlin 1.5 and dependencies updates (#1246)
* Kotlin 1.5 and dependencies updates

* Update mirai-console ref

* Use Kotlin 1.5.10

* 2.7-M1-dev-3

* Update console ref
2021-05-27 14:39:13 +08:00
Him188
23b296692e api dump 2021-05-09 00:54:48 +08:00
Him188
ae55908839 api dump 2021-05-09 00:54:48 +08:00
Him188
31bdd82bf5 Add mirai-core-compileKotlinJvm.txt and mirai-core-compileKotlinAndroid.txt 2021-05-09 00:54:48 +08:00
Him188
57eb716e31
Add inline BotFactory.newBot for Kotlin DSL. fix #1233 (#1234) 2021-05-02 13:51:32 +08:00
Him188
a8a448272d Add BotConfiguration.heartbeatStrategy
(cherry-picked from #1229)
2021-04-30 22:56:00 +08:00
wdvxdr1123
758eca55cd
feat: support kugou,kuwo music share (#1228)
* feat: support kugou,kuwo music share

* fix: api check

* fix: api check again

* Update MusicShare.kt

Co-authored-by: Him188 <Him188@mamoe.net>
2021-04-30 22:03:36 +08:00
Hoshino Tented
1bf1e3686f
添加管理员修改功能 (#1178)
* add modifyAdmin

* 修复赋予相同权限时不会抛错并且仍然广播事件的 bug

* fix test failed

* fix test failed AGAIN

* fix myself

* 是这样吗

* i am so sorry :(

* fix fixed bug
2021-04-16 08:33:07 +08:00
Him188
f3d3130f2d Support login cache and login without password. close #1158 2021-04-10 18:46:39 +08:00
Him188
455ed6fbeb Move NormalMember.isMuted from extension to member function. fix #1037 2021-04-10 12:58:10 +08:00
Him188
8d3a4fbf5b
Deprecate RemoteFile.moveTo(String) for ambiguous behavior (#1180) 2021-04-09 18:33:12 +08:00
Him188
e20313636a Make Group.setEssenceMessage static 2021-04-08 18:17:00 +08:00
Him188
944099a977 Add _MiraiInstance to allow internal instance overrides 2021-04-07 21:49:44 +08:00
Karlatemp
b227f719a2
Fix kt compiler errors (#1159)
* Fix kt compiler errors

* Revert "Fix compiler bug, fix #1136"

This reverts commit 39f6c168

* Fix log style

Co-authored-by: Him188 <Him188@mamoe.net>
2021-04-05 22:41:26 +08:00
Him188
45aca5f37d
Add ForwardMessageBuilder.toRawForwardMessage and make RawForwardMessage stable (#1162)
* Add `ForwardMessageBuilder.toRawForwardMessage` and make RawForwardMessage stable.

* apiDump
2021-04-05 22:35:52 +08:00
Him188
7521e6d17f
Rename RichMessageOrigin to MessageOrigin (#1116)
* Rename `RichMessageOrigin` to `MessageOrigin`

* apiDump

* Change `MessageOrigin.origin` parameter type from `RichMessage` to `SingleMessage`;
Rename `RichMessageKind` to `MessageOriginKind`

* Make MessageOriginKind serializable and update docs

* Ensure binary compatibility with <2.6 and provide migration helpers

* apiDump
2021-04-04 00:31:33 +08:00
Him188
ea1f43b9c5
Fast login (#1154)
* wtlogin10

* Fast login Packet Implement (#1125)

* Correct group syncing logic again, Fix #1120

* Implement fast login packet, thanks to MiraiGo

* Delete duplicated tlv

* Refresh Token when exchanging and solve connection dropping issue (#1128)

* Correct group syncing logic again, Fix #1120

* Implement fast login packet, thanks to MiraiGo

* Delete duplicated tlv

* Schedule token exchanging every 10 minutes, solve connection dropping issue

* Refresh Token when exchanging, and correct token expire time

* Remove useless params for doFastLogin

* Fix missed register and tgt update (#1131)

* Correct group syncing logic again, Fix #1120

* Implement fast login packet, thanks to MiraiGo

* Delete duplicated tlv

* Schedule token exchanging every 10 minutes, solve connection dropping issue

* Refresh Token when exchanging, and correct token expire time

* Remove useless params for doFastLogin

* Fix missed register and tgt update

* Add login lock

* Add login lock

* Remove key refresh

* Remove heartbeat period override

* Login: Update tlv and solve constant connection dropping issue (#1150)

* Correct group syncing logic again, Fix #1120

* Implement fast login packet, thanks to MiraiGo

* Delete duplicated tlv

* Schedule token exchanging every 10 minutes, solve connection dropping issue

* Refresh Token when exchanging, and correct token expire time

* Remove useless params for doFastLogin

* Fix missed register and tgt update

* Update tlv, add tlv11d and tlv11a decoding

* Add stat heartbeat, solve constant connection dropping issue

* Update apidump for new configuration

* Add comment for statHeartbeatPeriodMillis

* Change old naming

* Add since version

Co-authored-by: Him188 <Him188@mamoe.net>

Co-authored-by: sandtechnology <20417547+sandtechnology@users.noreply.github.com>
2021-04-03 22:31:14 +08:00
Him188
430c2c59ad
Support UnsupportedMessage (#1112)
* Support UnsupportedMessage

* Fix serialize

* `UnsupportedMessage.contentToString`: use `struct.contentHashCode()`

Co-authored-by: Karlatemp <karlatemp@vip.qq.com>
2021-03-26 23:54:17 +08:00
Him188
0c3c85f61c Add members to make ForwardMessageBuilder easier to use from Java, close #1087 2021-03-22 11:24:26 +08:00
Him188
daa7453d73 Add UserOrBot.nameCardOrNick 2021-03-22 11:16:34 +08:00
Him188
146433d56f Add common UserOrBot.nick 2021-03-22 11:16:34 +08:00
Him188
95d879c3e2 apiDump 2021-03-20 22:51:13 +08:00
Him188
09cbc55ef6 RemoteFile.FileInfo.resolveToFile: use FileSupport than Group 2021-03-20 16:45:01 +08:00
Him188
74d59982ae Add more extensions for RemoteFile and ExternalResource 2021-03-20 15:59:58 +08:00
Him188
b5d8306902 Add RemoteFile.listFilesCollection()
Co-authored-by: Karlatemp <karlatemp@vip.qq.com>
2021-03-20 15:59:58 +08:00
Him188
af58c163d2 - Add FileMessage.internalId hence support serialization
- Add FileMessage.Serializer
- Add FileMessage.create and IMirai.createFileMessage to construct manually
- Mark FileMessage as stable
- Move TestMiraiCode from mirai-core-api to mirai-core

fix #1082
2021-03-20 15:33:08 +08:00
Him188
841b94e9a7 Merge remote-tracking branch 'mirai/dev' into dev 2021-03-18 12:37:13 +08:00
Him188
9d28540073 Update blocking bridge version to 1.10.3, fix NoClassDefFoundError, fix #1078 2021-03-18 12:36:53 +08:00
Karlatemp
3152e24523
Fix operations of RemoteFile (#1104)
* Fix operations of RemoteFile

* apiDump

* Remove duplicate method

* Don't setup fileId
2021-03-18 12:30:06 +08:00
Him188
e256ec06d3
Support file operations (#1069)
* Proto structs for group file

* RemoteFile fundamental abstraction and proto structs

* Configure JVM target for mirai-console-intellij

* Add Group.filesRoot

* Fix build

* Implement a FileSystem for RemoteFile resolution

* Fix RemoteFile FileSystem and implement resolve and listFiles

* Implement file info query and file download

* Support uploading group file

* Support file feeds

* 2.5-M2-dev-1

* Fix tests

* 2.5-M2-dev-2

* Add uuid-based resolving, support getting file details

* Support FileMessage receive

* Support sending FileMessage

* 2.5-M2-dev-3

* Add DownloadInfo.id

* Improve RemoteFile.delete

* Support move, delete, rename, mkdir. Simplify listFiles

* - Rename RemoteFile.write to .upload.
- Prefer id matching
- Improve move

* Add permission checks

* Improve permission checks

* Rearrange functions and add constant ROOT_PATH

* Introduce FileSupported, add extensions

* Introduce ProgressionCallback

* Fix docs and uploadFileAndSend

* Remove empty FileHighway.kt

* Add test testNormalize

* Add RemoteFile.contact, change RemoteFile.uploadAndSend return type to MessageReceipt

* Move @JvmBlockingBridge to file

* Change FileMessage.toRemoteFile parameter type Group to FileSupported

* Add impl notes #1082
2021-03-08 18:34:45 +08:00
Karlatemp
d5e6483dc1
apiDump for Android 2021-02-26 18:36:35 +08:00
Him188
cad9bd2479 apiDump for Android 2021-02-25 11:22:11 +08:00
Him188
aaab3ae109 Merge branch 'dev' into android_target
# Conflicts:
#	build.gradle.kts
2021-02-25 10:39:51 +08:00
Him188
95688e37af
Update to Kotlin 1.4.30 and bump other dependencies versions (#1049)
- kotlin-stdlib and compiler 1.4.30
- kotlinx-serialization 1.1.0-RC
- kotlinx-coroutines 1.4.2
- ktor 1.5.1
- atomicfu 0.15.1
- yamlkt 0.9.0
- kotlin-jvm-blocking-bridge 1.10.0
- intellij 2020.3.2
- kotlin-intellij 203-1.4.30-release-IJ7148.5
- Gradle 6.8.2
2021-02-24 12:15:19 +08:00
Him188
9c3a175b02 Configure binary compatibility validator for android target 2021-02-24 11:36:03 +08:00
Him188
1ce26c393c Implement SingleFileLogger separately for different platforms, ensure binary compatibility 2021-02-24 09:55:33 +08:00
Karlatemp
9bb3ae20ef
MiraiCode of MusicShare (#1044)
* Improve MiraiCode parsing

* MiraiCode of MusicShare
2021-02-23 23:00:32 +08:00
Him188
4ac7d3fa9a
Support Dice (#1018)
* Add Dice public API #1012, close #1017

* Extract MarketFaceImpl to separate file

* Dice protocol impl #1012

* Dice refinement

* Add serialization support for Dice

* Add mirai code support for Dice

* Update docs/Messages.md

Co-authored-by: Karlatemp <karlatemp@vip.qq.com>

* Update mirai-core-api/src/commonMain/kotlin/message/data/Dice.kt

Co-authored-by: Karlatemp <karlatemp@vip.qq.com>

* Add dice mirai code test

Co-authored-by: sandtechnology <a1294790523@hotmail.com>
Co-authored-by: lc6a <1952511149@qq.com>
Co-authored-by: Karlatemp <karlatemp@vip.qq.com>
2021-02-13 11:34:23 +08:00
Him188
c51eea6268 - Simplify ContactListCache configuration
- Add kotlin.Duration support
- Disable contact list cache by default for stability
2021-02-11 16:58:43 +08:00
Karlatemp
0d58e6e3ab
Convert CRLF(\r\n), CR(\r) to LF(\n); fix #1010 2021-02-11 08:48:01 +08:00
Him188
cda6aaa79b Simplify cache configuration.
Improve cache saving:
- Use ProtoBuf to serialize BdhSession
- More readable servers.json
2021-02-10 15:20:39 +08:00
Him188
01374b1d32 Merge remote-tracking branch 'mirai/dev' into dev 2021-02-09 18:40:51 +08:00
Him188
9a32b2690e RichMessageOrigin support for MusicShare. fix #950 2021-02-09 18:40:30 +08:00
Karlatemp
c9f56175af
Cache BdhSession and ServerList for next login 2021-02-09 13:51:08 +08:00
Him188
aaa655f167 Move @JvmBlockingBridge on member functions to containing classes 2021-02-08 12:15:58 +08:00
Him188
bdcc92f0e9 Update blocking bridge version 2021-02-08 12:05:38 +08:00
Him188
31839b76a3 Enable cache by default, change default cache dir, change enableXXXCache to disableXXXCache in BotConfiguration 2021-02-07 13:55:08 +08:00
Him188
4f3ced5407 apiDump 2021-02-07 13:43:03 +08:00