Commit 43e0c3b4 authored by ryoii's avatar ryoii

Http api rename private method addCache

parent bebcf1aa
...@@ -37,14 +37,15 @@ class MessageQueue : ConcurrentLinkedDeque<BotEvent>() { ...@@ -37,14 +37,15 @@ class MessageQueue : ConcurrentLinkedDeque<BotEvent>() {
} }
} }
// TODO: 等FriendMessage支持quote
if (event is GroupMessage) { if (event is GroupMessage) {
addCache(event) addQuoteCache(event)
} }
} }
return ret return ret
} }
private fun addCache(msg: GroupMessage) { private fun addQuoteCache(msg: GroupMessage) {
quoteCache[msg.message[MessageSource].messageUid.toLong()] = msg quoteCache[msg.message[MessageSource].messageUid.toLong()] = msg
if (quoteCache.size > quoteCacheSize) { if (quoteCache.size > quoteCacheSize) {
quoteCache.remove(quoteCache.firstKey()) quoteCache.remove(quoteCache.firstKey())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment