Commit Graph

368 Commits

Author SHA1 Message Date
Him188
2de767d499 Fix unexpected exception thrown when no bot available on Image.queryUrl() 2020-05-21 10:39:13 +08:00
Him188
ae32536ed5 Move BotImpl and BotNetworkHandler to mirai-core-qqandroid. 2020-05-16 14:29:03 +08:00
Him188
46598d686c Cleanup;
Use interface for JavaFriendly APIs;
Deprecate event responder in Bot in the favor of their member functions;
Deprecate `Bot.queryUrl(image: Image)`` in the favor of the extension `Image.queryUrl`
2020-05-16 14:14:21 +08:00
Him188
dc8945aa39 Increase default heartbeatTimeoutMillis 2020-05-14 19:24:49 +08:00
Him188
f5db6e0201 Improve docs 2020-05-14 19:12:32 +08:00
Him188
29012d74c1 Add docs 2020-05-11 15:50:18 +08:00
Him188
06205cb69b Improve Bot life cycle management, close #317 2020-05-10 15:41:08 +08:00
Him188
90c0c5c549 Optimize experimental API usages 2020-05-10 02:22:16 +08:00
Karlatemp
0716438242
Update duration display 2020-05-09 11:06:00 +08:00
Him188
2d9db234d7 Introduce FileCacheStrategy;
Rework `ExternalImage`, introduce `ReusableInput` for multiple attempts when uploading images;
Add `BotConfiguration.fileCacheStrategy`, defaults use cache system from host OS;
Introduce `DeferredReusableInput` for `*.toExternalImage` on JVM.
Deprecate `*.suspendToExternalImage` as no longer need to be suspend.
Open input only when required, close input after uploading files, fix #302
2020-05-05 16:09:32 +08:00
Him188
84cfe2626f Remove all @SinceMirai("0.x.x") 2020-05-05 13:56:17 +08:00
Him188
73c700b4b7 Support protocol selecting 2020-05-02 18:42:51 +08:00
Him188
fbf4dd6bb2 Adjust filenames 2020-05-02 18:12:40 +08:00
Him188
6b5cbc3dd7 Implement new ExternalImage and image chunk strategy 2020-05-02 17:58:22 +08:00
Him188
2be325d781 Remove all deprecated APIs 2020-05-02 16:56:18 +08:00
Him188
a7e0f63dc6 FileCacheStrategy, ReusableInput fundamental 2020-05-02 16:16:33 +08:00
Him188
1a4c3ba602 Simplify Image structure: deprecate online and offline classification. 2020-05-01 21:51:09 +08:00
Karlatemp
c17e8a3263
支持监听优先级, 事件传递拦截 (#279)
* 支持监听优先级, 事件传递拦截

* Fix test

* 并发

* 优先级&并发

* Test

* Fix unused

* To GlobalEventListeners

* Add tests

* intercept with subscribeAlways

* test listener.complete()

* Add functions

* Fix test and add new test

* Test concurrent listening

* Test concurrent listening

* update broadcast

* Fix Boom

Co-authored-by: Him188 <Him188@mamoe.net>
2020-05-01 21:05:04 +08:00
Him188
644f0f175b Deprecate ExternalImage constructors 2020-04-29 19:39:41 +08:00
Him188
9b4006222f Rework re-init, fix #282 2020-04-28 16:35:03 +08:00
Him188
c89e2a7aa6 Improve performance 2020-04-27 22:25:53 +08:00
Him188
c3de96dde0 Mark LockFreeLinkedList with MiraiInternalAPI, planning to make it internal in 1.0.0 2020-04-27 22:07:27 +08:00
Him188
437f9db575 Unified Image suffix: .mirai 2020-04-23 20:37:01 +08:00
Him188
5b2ae6e9ad Simplify Image structure, close #244 2020-04-23 17:10:21 +08:00
Him188
a63af80668 Deprecate QQ
Introduce `Friend` extending `User`
Introduce `User` acting as the superclass of `Friend` and `Member`

Add extensions `Member.asFriend`, etc.
Remove specialized `Contact.hashCode` and `Contact.equals`, inherit from `kotlin.Any`
Specify `toString` behavior in abstract `Contact` classes, instead of in implementation classes.

Add virtual member `Contact.sendMessage(String)`

Migrate the project from using `QQ` to `Friend`

Remove multiplatform Contact class structure, keep them common.

Remove extension `Long.at` in `GroupMessage`, `QQ.at` in `ContactMessage`.
Add `At.asMember()` in `GroupMessage`.

Make `calculateGroupUinByGroupCode`, `calculateGroupCodeByGroupUin` static on JVM.
2020-04-22 16:08:04 +08:00
Him188
1258746ec0 Add BotConfiguration.inheritCoroutineContext 2020-04-20 20:15:27 +08:00
Him188
1542b73fa9 Improve KDoc 2020-04-20 16:55:44 +08:00
Him188
90ee9b441a Rework reconnection, fixes #228 2020-04-15 16:46:39 +08:00
Him188
b3a56126d4 Change retention of SinceMirai to BINARY 2020-04-15 08:47:53 +08:00
Him188
f5a8420231 Speed up image uploading 2020-04-13 11:13:27 +08:00
Him188
da39cc41a8 Fix fatal error catching on init 2020-04-08 13:58:56 +08:00
Him188
d9756c212c Add common runBlocking for convenience 2020-04-08 10:49:04 +08:00
Him188
b8b749bf65 Completed CombinedMessage redesigning and constraining on concatenation 2020-04-06 18:04:41 +08:00
Him188
fb635c14bc Fix unsigned value representation 2020-04-02 21:28:31 +08:00
Him188
42595a37b0 Fix fixToString 2020-04-02 21:25:52 +08:00
Him188
32553fad2b Introduce ContactMessage to replace MessagePacket<*, *> 2020-04-02 20:27:16 +08:00
Him188
3773548983 Replace use of Bot.uin with Bot.id 2020-04-02 19:27:40 +08:00
Him188
97522bdf2a Rearrange internal APIs 2020-04-02 09:43:50 +08:00
Him188
1f7bc4e50f Fix #178 2020-03-31 11:57:19 +08:00
Him188
90ef83e345 Move protocol-specific classes to mirai-core-qqandroid 2020-03-29 02:46:38 +08:00
Him188
a7e9b151e4 Support long messages 2020-03-29 02:26:59 +08:00
Him188
e30a1ea4b9 Fix length limitation 2020-03-28 23:58:09 +08:00
Him188
c854be95a7 Adjust visibility 2020-03-28 23:55:05 +08:00
Him188
5672837878 Add gzip and ungzip 2020-03-28 21:53:33 +08:00
Him188
c6a72ba638 Suppress expected warnings 2020-03-24 15:13:12 +08:00
Him188
70dd71cb61 Migrate to Kotlin 1.4 2020-03-24 13:42:33 +08:00
Him188
9b191f6763 Add close(onEach) 2020-03-22 15:57:14 +08:00
Him188
48cf885ca3 Revise @SinceMirai 2020-03-20 20:10:13 +08:00
Him188
243b2ea731 Gather all platform-specified utilities into a MiraiPlatformUtils 2020-03-08 21:14:41 +08:00
Him188
8bd6dfcf2c Change Retentions 2020-03-08 20:44:36 +08:00