Commit Graph

766 Commits

Author SHA1 Message Date
Him188
7908edb57b
[core+console] Raise deprecation level for 2.14, API including:
- EventChannel.asChannel
- (internal) syncFromEventImpl
- EmptyMessageChain
- GroupEntranceAnnouncementChangeEvent
- MiraiConsole.createLogger
- SingletonExtensionPoint
2022-12-27 15:53:12 +00:00
Him188
76a70f596f
[core] Raise deprecation level for RemoteFile to ERROR (for v2.14) 2022-12-27 14:34:41 +00:00
Him188
6fc1482f69
[core] Relocate ktor-io in mirai-core-api. Fix #2381 2022-12-04 14:49:47 +00:00
ヒューマンワーキン
5a645b4e8e
修正 'contentToString` 注释不严谨处 (#2374)
* 修正 'contentToString` 注释不严谨处

* link `At`
2022-12-03 14:55:21 +00:00
Him188
28f198d03f
[core] Add QiaoMen to PokeMessage.values. Fix poke id of QiaoMen. Close #2170. 2022-11-27 20:20:45 +00:00
Him188
60bbcf6e2c
[core] Revert "Review atomic calls and enable atomicfu compiler. Close #2315", due to atomicfu does not behave correctly when mirai-console depends on mirai-core-utils. Fixes #2329.
This commit reverts part of commit 564a7ce8f8
2022-11-27 20:08:21 +00:00
Him188
3360347ca2 [build] Fix dependency exclusion for builds when IDEA_ACTIVE 2022-11-27 15:25:18 +00:00
Him188
c0ccdbe9d3 [build] Rewrite shadow relocation 2022-11-27 15:25:18 +00:00
Karlatemp
28030dfb05
[core] [logging] Change message color of WARNING & ERROR; fix #2336 2022-11-09 22:57:10 +08:00
cssxsh
1c79da0f38
[core] feat: Announcement confirmed member api (#2255)
* feat: Announcement confirmed

* add: native

* add: todo

* fix: dump
2022-11-03 10:42:21 +00:00
微莹·纤绫
4abb3e3703
[core] Introduce Flow<T>.toStream() for simply implement Streamable (#2259)
* [core] Introduce `Flow<T>.toStream()` for simply implement `Streamable`

* Drop `unintercepted` support

* fix ci

* update test
2022-10-31 13:09:58 +00:00
Him188
e47b205e0d
[core] Fix docs of examples on ExternalResource 2022-10-31 10:53:10 +00:00
Him188
9613c9b7e5
[core] Add more information on LIMITED_MESSAGING 2022-10-31 10:44:13 +00:00
Him188
573f08955c
[core] Show specific reason for error 46 while sending message. Close #2127 2022-10-31 10:41:06 +00:00
Him188
c59de206cb
[core] Add default implementation of deprecated LoginSolver.onSolveUnsafeDeviceLoginVerify 2022-10-31 09:58:28 +00:00
Him188
564a7ce8f8
[core] Review atomic calls and enable atomicfu compiler. Close #2315 2022-10-29 13:04:37 +01:00
cssxsh
9818c08054
[core] Add sign event (#2217)
* add: SignEvent

* add: SignEvent

* add: hasRank

* add: api dump

* add: toString

* add: toString

* fix: sign for review
2022-10-29 11:11:20 +01:00
Him188
36cd688382
[core] Improve documentation for Group files 2022-10-28 14:42:28 +01:00
Him188
25e66d19c7
[core] Filter out relocated ktor dependencies in runtime except for mirai-core-utils and mirai-core-all. Fix #2291 2022-10-21 16:09:27 +01:00
Him188
eab14647e1
[core] Fix ArrayIndexOutOfBoundsException when loading device infos generated by < 2.9.0. Fix #2280 2022-10-19 16:19:34 +01:00
Him188
4595f937e4
[core] Add MessageChain.deserializeFromMiraiCode without redundant receiver MessageChain. 2022-10-14 16:00:31 +01:00
Him188
73293251d1
[core] Improve docs for messages 2022-10-13 15:35:34 +01:00
Him188
3b5ced4328
[core] Improve exception thrown by MessageChain.recall and .recallIn: add tips 2022-10-13 15:35:24 +01:00
Him188
16609fb1e0
[core] Introduce Streamable for simplified multiplatform asFlow a… (#2256)
* [core] Introduce `Streamable` for simplified multiplatform `asFlow` and `asStream`. Make `Announcements.asFlow` not suspend.

* Remove `@JvmBlockingBridge` in native
2022-09-25 23:44:18 +08:00
Him188
d1273401f6
[core] Remove dependency kotlinx-coroutines-jdk8 from mirai-core-api 2022-09-23 21:38:07 +08:00
Him188
9122dddfb7
[core] Add net.mamoe.mirai.utils.Closeable for MPP use 2022-09-23 21:38:06 +08:00
Him188
b360f58c2b
[core] Make ExternalResource.input an internal API. helps #2254 2022-09-23 21:38:06 +08:00
cssxsh
d000f2ea0f
[core] add group level api (#2115)
* add: api dump

* feat: Member.level

* add: api dump

* rename: level to rank

* feat: rank show

* feat: honor flag

* fix: honor flag index

* feat: record and chart

* feat: flag and docs

* add: api dump

* fix: active

* fix: honor

* fix: active

* fix: rebase

* fix: docs

* feat: MemberActive

* fix: for review

* feat: other notification

* remove: low level api

* add: since and api dump

* add: since

* for: review

* add: event sync

* fix: name and docs

* fix: api dump

* fix: for review

* add: ActiveRank, MemberMedal close #2233

* fix: active for review

* improve public API for inlined GroupHonorType

* Change `@since 2.13.0` to `@since 2.13`

* dump api changes

* implement mock framework for Active

* change `GroupActive.flush` to `GroupActive.refresh`

* improve docs for GroupActive

* remove unnecessary expect/actual for MemberActive

* change property names in GroupInfo

* check permission in MockGroupActiveImpl

* optimize member names in  CommonGroupActiveImpl

* fix error checking

* dump api

Co-authored-by: Him188 <Him188@mamoe.net>
2022-09-21 23:18:50 +08:00
Him188
aa40f3f3d7
[core] fix since version of ExternalResource.input 2022-09-21 12:01:47 +08:00
Him188
d32a8a566c
[core] Use Java URL connection for TxCaptchaHelper.
^Fixes previous commit c804bbda13
2022-09-11 20:02:42 +08:00
Him188
c804bbda13
[core] Remove dependency on ktor-client for mirai-core-api. Fix duplicated class errors on Android, close #2248 2022-09-11 19:49:43 +08:00
Him188
eb89b6348d [core] Support solving device verification request by SMS:
- close #2190, helps #717
- deprecate `LoginSolver.onSolveUnsafeDeviceLoginVerify`, add `.onSolveDeviceVerification`
2022-09-11 19:41:16 +08:00
Him188
2eb2c3acd0
[core] Add default AbstractExternalResource.input implementation 2022-09-09 18:43:29 +08:00
Karlatemp
5ac74a336f
Create module mirai-console-frontend-base 2022-09-06 18:21:37 +08:00
Karlatemp
969c77f146
[console] Change convention of createLoggerFactory() 2022-08-28 22:52:48 +08:00
Him188
f0651c81c6
[core+console] Improve logging hierarchy: (#2196)
- always use factory API from mirai-core
- Terminal is still overriding standard outputs
- plugins are forbidden to override logging framework (this was allowed but not working before)
2022-08-27 18:46:16 +08:00
Him188
2d393ee0b0
[core+console] Raise deprecation level for 2.13: (#2213)
- warningSince 2.11 -> errorSince 2.13
 - errorSince 2.12 -> hiddenSince 2.13
 - some experimental APIs removed
2022-08-27 14:06:03 +08:00
Eritque arcus
fea1d28488
[core] Support friend group (#2113)
* feat: support friend group

* remove unnecessary modifications

* toByteArray2

* support friendGroup, with api dump

* support rename, with api dump

* modify as required

* modify as required

* reverse

* doc

* FriendGroups

* api dump

* modify as required

* fix CI

* FriendGroup sync notice

* api dump

* modify as required

* immutable

* add friends: ContactList in FriendGroup

* more sync notice

* modify log content

* Change `FriendGroup.friends` to `Collection<Friend>`

* Fix `FriendGroup.friends.isEmpty()`

* modified as require, untested

* del count and online count in info

* change import

* fix missing import

* set @since 2.13 and modified as required

* modified as required

* modified as required

* doc

* change friendGroupId type to Int?

* api dumped

* change friendGroupId type to Int?

* introduce null to friendGroupId

* modified as required

* chore

* api dump

* chore: remark

* change int? to int

* api dump

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

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

* Move FriendGroup and FriendGroups to contact.friendgroup

* Make `Friend.friendGroup` not null

* add FriendGroups.default for default group

* Redesign FriendGroup interface

Co-authored-by: Karlatemp <kar@kasukusakura.com>
Co-authored-by: Him188 <Him188@mamoe.net>
2022-08-26 16:56:09 +08:00
Him188
fb3f39e328 [core] Improve NetworkHandler exception handling and optimize exception logging:
- close #2175
- close #2148
- Fix `Throwable.findCause`
- Rename `mirai.network.handle.selector.logging` to `mirai.network.handler.selector.logging`
- Hide rather long and complicated `CancellationException`s, use `mirai.network.handler.cancellation.trace` to re-enable it
2022-08-26 15:20:04 +08:00
Eritque arcus
b4066ac6d1
NextEventAndIntercept and NextMessageAndIntercept (#2177)
* rewrote pr, no tested

* test and change param position

* enable ci

* finish test

* modified as required

* typo
2022-08-23 18:07:03 +08:00
Him188
a51f55124c
Mark ExternalResource.isAutoClose, ExternalResource.useAutoClose and ExternalResource.runAutoClose stable 2022-08-16 10:26:45 +08:00
Him188
39074f1764
[build] Update to Kotlin 1.7.10:
Kotlin 1.7.10
kotlinx-serialization 1.3.3
kotlinx-coroutines 1.6.4
kotlinx-atomicfu 0.17.3
Ktor 2.1.0
2022-08-15 18:36:40 +08:00
Him188
9dd57de844
[core] Fix cache dir on native. part of #2160. 2022-08-15 16:18:50 +08:00
Eritque arcus
6b8c054948
[core] Support change friend remark (#2112)
* feat: support ChangeFriendName

* fix: register factory

[skip ci]

* rebase dev

* kdoc?

* api dump

* kdoc

* rebase dev

* remove unnecessary modification

* info::remark -> info.remark

* rebase dev

* api dump

* try to fix CI

* Add `@since` for `Friend.remark` setter

Co-authored-by: Him188 <Him188@mamoe.net>
2022-08-14 10:15:42 +08:00
Him188
f96c156d82
[core] Implement ConstrainSingle for Audio (fix #2093) 2022-08-12 09:14:16 +08:00
cssxsh
9db5d2c4b5 Add client properties to MessageSyncEvents, add OtherClientCommandSenderOnMessageSync and MessageSyncEvent.toCommandSender 2022-08-03 11:27:39 +08:00
cssxsh
c38740ce2f
在 Image 序列化时支持全部属性 (#2036)
* fix: Image Serializer Delegate

* use: api dump

* add: test Image serialization

* fix: type (SerialName) and deserialize

* fix: native test
2022-07-22 03:05:08 +08:00
Him188
e5cad1d0ba
Rewrite MessageSerializers for new project structure (#2159) 2022-07-20 15:09:09 +08:00
Him188
fd67ba9204 Configure shadow relocation and add checks for multiplatform publishing 2022-07-20 00:30:16 +08:00
AdoptOSS
7325c1f7e2 native: 优化 build script 及 actions,修复 ECDH 相关资源释放问题 (#2110)
* build: fix build on Windows

* test: fix ContentEqualsTest on native

* build: allow disabling targets with property

* fix: free ECDH-related resources properly on native
avoid memory leaking (usually on *nix) or crash (usually on Windows)

Signed-off-by: AdoptOSS <adoptoss@outlook.com>

* build(workflow): remove invalid options

* fix(styling): `mirai.target` property

* build(workflow): try to limit memory usage during mirai-console:tools:gradle-plugin:integTest

* enhance(test): use buildList

* build(workflow): retry

Co-authored-by: ArcticLampyrid <arcticlampyrid@outlook.com>
2022-07-20 00:30:16 +08:00