fix bug(暂未完成 请勿使用)

This commit is contained in:
Simplxs 2024-02-21 00:08:41 +08:00
parent aa7b241dba
commit e9884a5fa8
No known key found for this signature in database
GPG Key ID: E23537FF14DD6507
2 changed files with 10 additions and 3 deletions

View File

@ -239,6 +239,7 @@ internal object MsgSvc : BaseSvc() {
)
)
)
LogCenter.log(ProtoBuf.encodeToByteArray(payload).toHexString(), Level.DEBUG)
val req = LongMsgReq(
sendInfo = SendLongMsgInfo(
@ -292,7 +293,7 @@ internal object MsgSvc : BaseSvc() {
if (it.command == "MultiMsg") {
return Result.success(it.data?.body?.map { msg ->
val chatType =
if (msg.content!!.msgType == 1) MsgConstant.KCHATTYPEC2C else MsgConstant.KCHATTYPEGROUP
if (msg.content!!.msgType == 82) MsgConstant.KCHATTYPEGROUP else MsgConstant.KCHATTYPEC2C
MessageDetail(
time = msg.content?.msgTime?.toInt() ?: 0,
msgType = MessageHelper.obtainDetailTypeByMsgType(chatType),

View File

@ -107,7 +107,13 @@ internal object SendForwardMessage : IActionHandler() {
) else null
),
content = MessageContent(
msgType = record.msgType,
msgType = when (record.chatType) {
MsgConstant.KCHATTYPEC2C -> 529
MsgConstant.KCHATTYPEGROUP -> 82
else -> throw UnsupportedOperationException(
"Unsupported chatType: $chatType"
)
},
msgViaRandom = record.msgId,
msgSeq = record.msgSeq,
msgTime = record.msgTime,
@ -160,7 +166,7 @@ internal object SendForwardMessage : IActionHandler() {
peerUid = data["uid"]?.asString ?: TicketSvc.getUid()
),
content = MessageContent(
msgType = 166,
msgType = 529,
msgViaRandom = 4,
msgSeq = data["seq"]?.asLong ?: Random.nextLong(),
msgTime = data["time"]?.asLong ?: (System.currentTimeMillis() / 1000),