Commit Graph

3128 Commits

Author SHA1 Message Date
Karlatemp
d9f3fe616c
[core] Fix ForwardMessage rendering on iOS; fix #1575 2022-12-15 00:22:45 +08:00
Karlatemp
3abef93fd8
[core] Fix jceData of MessageSource from ForwardMessage; fix #2342 2022-12-11 22:29:10 +08:00
Karlatemp
c77ed79b12
[core] Encode html entities for forward message; fix #2241 2022-12-11 22:26:06 +08:00
Karlatemp
c52e99dd87
[core] Include more details in error message to help debug. 2022-12-08 23:44:30 +08:00
Karlatemp
e65f4e65c8
[core] Improve error message of NormalMember.modifyAdmin(); #2370 2022-12-03 19:59:48 +08:00
Karlatemp
b5fcbe99fb
[core] Improve error message of NormalMember.modifyAdmin(); #2370 2022-12-03 19:30:15 +08: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
76cee371a9 [build] Register native binaries for mirai-core only to speed up builds 2022-11-27 15:25:18 +00:00
Him188
c0ccdbe9d3 [build] Rewrite shadow relocation 2022-11-27 15:25:18 +00:00
Karlatemp
372c25024c
[core] Fix temporary buffer acquiring; Fix #2309 2022-11-18 20:41:53 +08:00
Karlatemp
b38687a3ea
[core] Temporary disable Reconnect without slider request; Reduce device banning caused by loginsolver error 2022-11-15 18:20:33 +08:00
Karlatemp
90f2fee243
[core] Don't reconnect if error in onSolveSliderCaptcha 2022-11-15 18:18:57 +08:00
Karlatemp
85bf607b60
[core] Include login solver information in UnsupportedSliderCaptchaException 2022-11-15 18:15:36 +08:00
Karlatemp
bbf3c09ae4
[core/debug] Fix build 2022-11-14 06:02:46 +08:00
Karlatemp
fe70187881
[core/debug] Add utils for debug running; Update docs for launch debug run 2022-11-14 00:33:07 +08:00
Karlatemp
dd143890cd
[core] Fix bad atomic 2022-11-08 12:41:02 +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
Him188
f24ca9628f
[core] Optimize array expansions 2022-11-02 19:29:02 +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
7e84330262
[core] Use netty-handler instead of netty-all to reduce size 2022-10-29 13:11:30 +01:00
Him188
564a7ce8f8
[core] Review atomic calls and enable atomicfu compiler. Close #2315 2022-10-29 13:04:37 +01:00
Him188
ab8e53fc76
[core] Suppress NOTHING_TO_INLINE warnings for AtomicIntSeq 2022-10-29 11:57:01 +01:00
Him188
2baba6a1f3
[core] Fix up previous commit 81a09549e7 2022-10-29 11:56:08 +01:00
Him188
d0f825b0b0
[core] Replace AtomicIntSeq with value class implementations to optimize space. Close #2287 2022-10-29 11:49:30 +01:00
Him188
81a09549e7
[core] Fix potential memory leak with buildPacket 2022-10-29 11:36:41 +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
cssxsh
c9d1d386b1
fix: ANDROID_PHONE and ANDROID_WATCH (#2312)
* fix: ANDROID_PHONE and ANDROID_WATCH

* fix: ANDROID_PHONE
2022-10-28 22:49:09 +01:00
Him188
9c3514dc89
[core] Remove necessary inlining in MessageSvcPbSendMsg to improve debugging experience 2022-10-28 14:46:24 +01:00
Him188
1f8524fb04
Fix all compiler warnings throughout the project 2022-10-21 17:00:37 +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
Karlatemp
ddfd22e541
[core] [Network] Handle non ipaddress converting caused by some unknown 2022-10-20 12:58:09 +08:00
Karlatemp
58ab562322
[core - JVM] [Network] Wrap exception from connecting to NettyChannelException to allow selector to reconnect 2022-10-20 12:56:39 +08:00
Karlatemp
5fb1d714f7
[core] Improve exception message of Outdated Version 2022-10-15 22:39:27 +08:00
Him188
4276b67b2b
[core] Fix internal comments in estimateLength 2022-10-13 15:39:00 +01:00
Him188
73293251d1
[core] Improve docs for messages 2022-10-13 15:35:34 +01:00
Karlatemp
dc6f590581
[mock] Fix building
- caused by 5ed9dc7e
2022-10-13 00:27:55 +08:00
Him188
5ed9dc7e89
[core] Check service configuration when loading MessageProtocols. Helps #2268 2022-10-12 14:54:47 +01:00
Him188
4d80e0e6d3
[core] Improve documentation on processor pipeline system. 2022-10-12 14:38:17 +01:00
Him188
7c1e468b85
[core] Load FriendGroups separately from Friends. Fix #2274. 2022-10-12 12:05:31 +01:00
Him188
7fd3234ff3
[core] Fix bot.close, ensure network is also closed, fix recursion problems. Fix #2266 2022-10-10 22:51:02 +01:00
Karlatemp
eb9143d520
[core] Use ptt codec 2022-10-10 00:34:06 +08:00
Karlatemp
9eef7d3787
[core] Fix group audio url fetching. fix #2269 2022-10-10 00:10:25 +08: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
2da0a2d6d3
[core] Fix relevant uses of Closeable 2022-09-23 23:01:39 +08:00
Him188
9122dddfb7
[core] Add net.mamoe.mirai.utils.Closeable for MPP use 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
AdoptOSS
397d824d33
[core] enhance(ECDH): reconstruct ECDH (#2161)
* enhance(ECDH): reconstruct ECDH
common: 移动特定于 QQ 平台的实现到 OicqECDH,重新设计 ECDH,使 ECDH 类只针对算法本身,而不过多包括 QQ 协议的使用细节
jvm: 尝试优先使用平台加密实现,可能改善性能
jvm & android: 使用 curveName `secp256r1` 代替 `prime256v1`,前者在 Java 中更常用,可以被更多的 JCE 实现所识别(虽然都是指同一条曲线)
android: 使用系统自带的实现以减少依赖,并尝试兼容 Android P+ 版本
native: 中间储存时保留OpenSSL内部结构而不反复 new & free,提高性能
    (为了实现智能指针,需要用到 `@ExperimentalStdlibApi` 的 `createCleaner`,但这种风险应该可以接受)
native: 直接使用 point/bignum 到 bytes 的转换,避免了 hex string 作为中间层,提高效率

* test(ECDH): fix AndroidTest

* style(Ecdh): obey official Kotlin coding conventions
> When using an acronym as part of a declaration name, capitalize it if it consists of two letters (IOStream); capitalize only the first letter if it is longer (XmlFormatter, HttpInputStream).
> [View origin](https://kotlinlang.org/docs/coding-conventions.html)

Co-authored-by: ArcticLampyrid <arcticlampyrid@outlook.com>
2022-09-11 20:14:39 +08:00
Him188
bfbc6bcb02 [core] Fix selector for CONNECTING state 2022-09-11 19:41:16 +08:00