mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 13:12:17 +08:00
Shamrock
: 履歴メッセージの取得をサポート x2
This commit is contained in:
parent
7584390408
commit
346798dc9a
@ -10,5 +10,8 @@ internal object GetGroupMsgHistory: IActionHandler() {
|
|||||||
return GetHistoryMsg("group", groupId, cnt, session.echo)
|
return GetHistoryMsg("group", groupId, cnt, session.echo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override val requiredParams: Array<String>
|
||||||
|
get() = arrayOf("group_id")
|
||||||
|
|
||||||
override fun path(): String = "get_group_msg_history"
|
override fun path(): String = "get_group_msg_history"
|
||||||
}
|
}
|
@ -2,6 +2,8 @@ package moe.fuqiuluo.shamrock.remote.action.handlers
|
|||||||
|
|
||||||
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
import com.tencent.qqnt.kernel.nativeinterface.MsgConstant
|
||||||
import com.tencent.qqnt.kernel.nativeinterface.MsgRecord
|
import com.tencent.qqnt.kernel.nativeinterface.MsgRecord
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.json.JsonElement
|
import kotlinx.serialization.json.JsonElement
|
||||||
import moe.fuqiuluo.qqinterface.servlet.msg.convert.MessageConvert
|
import moe.fuqiuluo.qqinterface.servlet.msg.convert.MessageConvert
|
||||||
import moe.fuqiuluo.shamrock.helper.MessageHelper
|
import moe.fuqiuluo.shamrock.helper.MessageHelper
|
||||||
@ -60,7 +62,7 @@ internal object GetHistoryMsg: IActionHandler() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok(data = msgList, echo = echo)
|
return ok(data = GetHistoryMsgResult(msgList), echo = echo)
|
||||||
}
|
}
|
||||||
|
|
||||||
override val requiredParams: Array<String>
|
override val requiredParams: Array<String>
|
||||||
@ -68,6 +70,11 @@ internal object GetHistoryMsg: IActionHandler() {
|
|||||||
|
|
||||||
override fun path(): String = "get_history_msg"
|
override fun path(): String = "get_history_msg"
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class GetHistoryMsgResult(
|
||||||
|
@SerialName("messages") val msgs: List<MessageDetail>
|
||||||
|
)
|
||||||
|
|
||||||
data class GetMsgResult(
|
data class GetMsgResult(
|
||||||
val code: Int,
|
val code: Int,
|
||||||
val msg: String?,
|
val msg: String?,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user