Commit Graph

512 Commits

Author SHA1 Message Date
AdoptOSS
7732014cbd
fix: do trimming properly in startsWith & endsWith, #1282 (#1314)
Co-authored-by: ArcticLampyrid <arcticlampyrid@outlook.com>
2021-06-08 15:42:37 +08:00
Him188
a9489567d0
Clearify docs for ExternalResource and RemoteFile (#1248)
* Update code docs for ExternalResource emphasising its properties

* Update code docs for ExternalResource emphasising its representative file location

* Update mirai-core-api/src/commonMain/kotlin/utils/RemoteFile.kt

* Update mirai-core-api/src/commonMain/kotlin/utils/RemoteFile.kt

* Clarify docs
2021-06-08 11:23:09 +08:00
Him188
6b442b251f Introduce AbstractEventTest 2021-06-07 18:56:33 +08:00
Him188
fc96ba96dd Add _EventBroadcast to allow tests to overrode implementation of Event.broadcast 2021-06-07 18:29:15 +08:00
Him188
9619338d5b Catch and forward event broadcasting to EventDispatcher 2021-06-07 18:18:07 +08:00
Him188
02681428c9 Review and migrate deprecated calls 2021-06-07 12:57:01 +08:00
Karlatemp
ef439f1dea
Fix API check 2021-06-07 12:33:31 +08:00
Him188
38d0b124f2 Fix docs on BotOfflineEvent.Force 2021-06-06 13:58:46 +08:00
Him188
c03155af6d
Review docs and improve readability (#1291)
* Review docs and improve readability

* Update docs/Bots.md

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

* Update docs/Bots.md

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

* Update docs/Bots.md

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

* Fix doc

* Fix doc

* Clarify AnonymousMember and NormalMember

* Fix typo

* Add language type

Co-authored-by: Karlatemp <karlatemp@vip.qq.com>
2021-06-02 20:29:36 +08:00
Him188
e0a767060a
Deprecate RemoteFile.upload and relevant extensions, fix #1255 (#1290)
* Deprecate `RemoteFile.upload` and relevant extensions, fix #1255

* Replace '// since 2.7-M1' with '// deprecated since 2.7-M1'

* Move deprecation notes to `RemoteFile.upload`
2021-06-02 14:00:24 +08:00
Karlatemp
1e95482158
Fix the resource leak when closing TxCaptchaHelper(Swing) directly 2021-06-01 12:47:42 +08:00
Karlatemp
c89d31cef6
Redesign LoginSolver (#1285)
* Redesign SwingSolver

* TxCaptchaHelper support

* Simplify TxCaptchaHelper
2021-06-01 12:26:37 +08:00
Him188
043006413c Change upper bound type of MessageSubscribersBuilder.has from Message to SingleMessage, fix #1223 2021-05-31 16:40:57 +08:00
Him188
e6f7edadeb Fix doc on MessageSource 2021-05-30 23:44:52 +08:00
Him188
2d10cc10be Add implementation notes for Listener 2021-05-30 09:42:24 +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
5e25c0e25b Remove bintray 2021-05-25 12:25:53 +08:00
Him188
d43a77b590 Update docs and improve source code readability 2021-05-09 15:31:50 +08:00
Him188
2e1ec03daa Deprecate ForceOfflineException 2021-05-09 13:12:34 +08:00
Him188
d755ebf7ee Use topLevelEventLogger instead of MiraiLogger.TopLevel for non-BotEvent events 2021-05-09 00:54:48 +08:00
Him188
35884182af Fix and improve event logging 2021-05-09 00:54:48 +08:00
Him188
d73f5a2692 Review BotConfiguration and implement relevant configs, implement alive heartbeat, fix behavior on resume 2021-05-09 00:54:48 +08:00
Him188
eb80a4836b Remove all unstable kotlin.Duration usages 2021-05-09 00:54:48 +08:00
Him188
a7a4879d05 Improve logging 2021-05-09 00:54:48 +08:00
Him188
5fa54114c1 Fix sso and event logging 2021-05-09 00:54:48 +08:00
Him188
8db8e2fb03 Implement lifecycle management for network 2021-05-09 00:54:48 +08:00
Him188
076cd4997d BotOfflineEventMonitor 2021-05-09 00:54:48 +08:00
Him188
b91bbfd2b8 Add NetworkHandlerFactory and tests for NetworkHandler 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
0dbb448cad Fix doc on BotConfiguration.inheritCoroutineContext 2021-05-01 10:54:21 +08:00
Him188
a8a448272d Add BotConfiguration.heartbeatStrategy
(cherry-picked from #1229)
2021-04-30 22:56:00 +08:00
Him188
104f7b4292 Fix statHeartbeatPeriodMillis not copied in BotConfiguration.copy 2021-04-30 22:06:15 +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
Him188
c7dfef9ad5 Improve logs on event exception 2021-04-29 12:31:09 +08:00
Him188
70dc0a4da6
Remove kotlin.time.Duration usages (#1215)
* Remove kotlin.Duration usages

* Fix build

* update submodule console ref
2021-04-27 11:49:30 +08:00
Him188
c3b6342d34 Fix EventChannelKotlinExtensions resolution ambiguity 2021-04-25 11:35:56 +08:00
AdoptOSS
09475efbda
fix: serialization plugin should not be put into runtime classpath (#1197) 2021-04-17 19:56:19 +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
770615f137 Ensure Mirai impl initialized on serialization, fix #1086 2021-04-07 23:28:41 +08:00
Him188
944099a977 Add _MiraiInstance to allow internal instance overrides 2021-04-07 21:49:44 +08:00
Him188
620771211e Merge remote-tracking branch 'mirai/dev' into dev 2021-04-05 23:58:54 +08:00
Him188
f0093a0cca Fix ignored exceptions in PlatformLogger on Android 2021-04-05 23:58:37 +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
AdoptOSS
21e8852e0f
buildscript: fix task not found errors when android sdk not available (#1161)
* buildscript: fix task not found errors when android sdk not available

* fix: this shadowed by run

* cleanup: code style

* improve: avoid breaking index map
2021-04-05 22:35:38 +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
cccdb3cdf2
Update docs for messages (#1142)
* Update docs for messages

* Update docs for messages

* Update docs for messages

* Update docs for messages

* Update docs/Messages.md

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

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

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

* Update docs for messages

* Update docs for messages

* Revert inappropriate changes

* Fix doc

Co-authored-by: Karlatemp <karlatemp@vip.qq.com>
2021-04-03 22:39:55 +08:00