-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add seq based roaming support for group #2549
Conversation
等 #2513 |
把这个也放到 rc 吧 |
发版之前写完就放 |
6a7c2ff
to
a3873b2
Compare
* @see MessageSource | ||
*/ | ||
public suspend fun getMessagesBefore( | ||
messageId: Int? = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用原始数据并不是一个好的做法,id 处理细节应该被隐藏, 用 MessageSource
而且用 messageId 不适合匹配别的 contact 实现
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得 source 不好,就用 message id 就够了
source里面有的东西太多了,source还有sender 和 receiver, 传进去还得额外考虑这个的行为,得查它 sender 和 receiver 与这个 contact 相关,也得查 kind
* @since 2.15 | ||
* @see MessageSource | ||
*/ | ||
public suspend fun getMessagesBefore( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before 语义上是不包含给定的起始信息本身的, 我的想法是让这个方法返回的流中的返回包含给定的信息本身可能会更好
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以都支持,把这个查询条件抽象出来,比如 Range.before/after/exact(id, inclusive = true)
, 还能加 after 与 in,自由更改参数,而不会增加和维护过多 getMessage “重载”,但这会一定程度增加复杂度,不过我感觉还好?
6, 这merge了个啥 |
08041f3
to
575bac4
Compare
@@ -1056,17 +1056,19 @@ public final class net/mamoe/mirai/contact/roaming/RoamingMessageFilter$Companio | |||
|
|||
public abstract interface class net/mamoe/mirai/contact/roaming/RoamingMessages { | |||
public fun getAllMessages (Lnet/mamoe/mirai/contact/roaming/RoamingMessageFilter;)Lkotlinx/coroutines/flow/Flow; | |||
public fun getAllMessages (Lnet/mamoe/mirai/contact/roaming/RoamingMessageFilter;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | |||
public abstract fun getAllMessages (Lnet/mamoe/mirai/contact/roaming/RoamingMessageFilter;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
abi changes
@@ -1056,17 +1056,19 @@ public final class net/mamoe/mirai/contact/roaming/RoamingMessageFilter$Companio | |||
|
|||
public abstract interface class net/mamoe/mirai/contact/roaming/RoamingMessages { | |||
public fun getAllMessages (Lnet/mamoe/mirai/contact/roaming/RoamingMessageFilter;)Lkotlinx/coroutines/flow/Flow; | |||
public fun getAllMessages (Lnet/mamoe/mirai/contact/roaming/RoamingMessageFilter;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | |||
public abstract fun getAllMessages (Lnet/mamoe/mirai/contact/roaming/RoamingMessageFilter;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
abi changes
No description provided.