From 43e0c3b4149741c474a7207cd31d06b034d62cc6 Mon Sep 17 00:00:00 2001 From: ryoii Date: Sat, 22 Feb 2020 18:02:13 +0800 Subject: [PATCH] Http api rename private method addCache --- .../kotlin/net/mamoe/mirai/api/http/queue/MessageQueue.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mirai-api-http/src/main/kotlin/net/mamoe/mirai/api/http/queue/MessageQueue.kt b/mirai-api-http/src/main/kotlin/net/mamoe/mirai/api/http/queue/MessageQueue.kt index bd15f6030..5d4e03399 100644 --- a/mirai-api-http/src/main/kotlin/net/mamoe/mirai/api/http/queue/MessageQueue.kt +++ b/mirai-api-http/src/main/kotlin/net/mamoe/mirai/api/http/queue/MessageQueue.kt @@ -37,14 +37,15 @@ class MessageQueue : ConcurrentLinkedDeque() { } } + // TODO: 等FriendMessage支持quote if (event is GroupMessage) { - addCache(event) + addQuoteCache(event) } } return ret } - private fun addCache(msg: GroupMessage) { + private fun addQuoteCache(msg: GroupMessage) { quoteCache[msg.message[MessageSource].messageUid.toLong()] = msg if (quoteCache.size > quoteCacheSize) { quoteCache.remove(quoteCache.firstKey())