Shamrock: チャンネルフラッシュバックの修正を試みる

This commit is contained in:
WhiteChi 2023-11-07 09:28:13 +08:00
parent 346798dc9a
commit 10d25167e8

View File

@ -31,6 +31,8 @@ internal object AioListener: IKernelMsgListener {
private suspend fun handleMsg(record: MsgRecord) { private suspend fun handleMsg(record: MsgRecord) {
try { try {
if (record.chatType == MsgConstant.KCHATTYPEGUILD) return // TODO: 频道消息暂不处理
val msgHash = MessageHelper.generateMsgIdHash(record.chatType, record.msgId) val msgHash = MessageHelper.generateMsgIdHash(record.chatType, record.msgId)
MessageHelper.saveMsgMapping( MessageHelper.saveMsgMapping(
@ -99,6 +101,8 @@ internal object AioListener: IKernelMsgListener {
} }
override fun onAddSendMsg(record: MsgRecord) { override fun onAddSendMsg(record: MsgRecord) {
if (record.chatType == MsgConstant.KCHATTYPEGUILD) return // TODO: 频道消息暂不处理
GlobalScope.launch { GlobalScope.launch {
try { try {
val msgHash = MessageHelper.generateMsgIdHash(record.chatType, record.msgId) val msgHash = MessageHelper.generateMsgIdHash(record.chatType, record.msgId)
@ -125,6 +129,7 @@ internal object AioListener: IKernelMsgListener {
override fun onMsgInfoListUpdate(msgList: ArrayList<MsgRecord>?) { override fun onMsgInfoListUpdate(msgList: ArrayList<MsgRecord>?) {
msgList?.forEach { record -> msgList?.forEach { record ->
if (record.chatType != MsgConstant.KCHATTYPEGUILD) // TODO: 频道消息暂不处理
GlobalScope.launch { GlobalScope.launch {
if (record.sendStatus == MsgConstant.KSENDSTATUSFAILED if (record.sendStatus == MsgConstant.KSENDSTATUSFAILED
|| record.sendStatus == MsgConstant.KSENDSTATUSSENDING) { || record.sendStatus == MsgConstant.KSENDSTATUSSENDING) {