mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-07 16:40:43 +08:00
Fix MessageChainBuilder.copy
not copying caches
This commit is contained in:
parent
25c489d238
commit
16ad3bc042
@ -186,7 +186,9 @@ public class MessageChainBuilder private constructor(
|
||||
* 将所有已有元素引用复制到一个新的 [MessageChainBuilder]
|
||||
*/
|
||||
public fun copy(): MessageChainBuilder {
|
||||
return MessageChainBuilder(container.toMutableList())
|
||||
return MessageChainBuilder(container.toMutableList()).also {
|
||||
it.cache.append(this.cache)
|
||||
}
|
||||
}
|
||||
|
||||
public override fun remove(element: SingleMessage): Boolean {
|
||||
|
Loading…
Reference in New Issue
Block a user