mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-09 19:50:27 +08:00
Fix QuoteReply
without msgHead, fix #1641
This commit is contained in:
parent
c56708ca7f
commit
69931538f5
@ -168,7 +168,9 @@ internal fun OfflineMessageSourceImplData(
|
|||||||
targetId = when {
|
targetId = when {
|
||||||
groupIdOrZero != 0L -> groupIdOrZero
|
groupIdOrZero != 0L -> groupIdOrZero
|
||||||
delegate.toUin != 0L -> delegate.toUin
|
delegate.toUin != 0L -> delegate.toUin
|
||||||
delegate.srcMsg != null -> delegate.srcMsg.loadAs(MsgComm.Msg.serializer()).msgHead.toUin
|
delegate.srcMsg != null -> runCatching {
|
||||||
|
delegate.srcMsg.loadAs(MsgComm.Msg.serializer()).msgHead.toUin
|
||||||
|
}.getOrElse { 0L }
|
||||||
else -> 0/*error("cannot find targetId. delegate=${delegate._miraiContentToString()}, delegate.srcMsg=${
|
else -> 0/*error("cannot find targetId. delegate=${delegate._miraiContentToString()}, delegate.srcMsg=${
|
||||||
kotlin.runCatching { delegate.srcMsg?.loadAs(MsgComm.Msg.serializer())?._miraiContentToString() }
|
kotlin.runCatching { delegate.srcMsg?.loadAs(MsgComm.Msg.serializer())?._miraiContentToString() }
|
||||||
.fold(
|
.fold(
|
||||||
|
Loading…
Reference in New Issue
Block a user