mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 13:12:17 +08:00
fix bug(暂未完成 请勿使用)
This commit is contained in:
parent
aa7b241dba
commit
e9884a5fa8
@ -239,6 +239,7 @@ internal object MsgSvc : BaseSvc() {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
LogCenter.log(ProtoBuf.encodeToByteArray(payload).toHexString(), Level.DEBUG)
|
||||||
|
|
||||||
val req = LongMsgReq(
|
val req = LongMsgReq(
|
||||||
sendInfo = SendLongMsgInfo(
|
sendInfo = SendLongMsgInfo(
|
||||||
@ -292,7 +293,7 @@ internal object MsgSvc : BaseSvc() {
|
|||||||
if (it.command == "MultiMsg") {
|
if (it.command == "MultiMsg") {
|
||||||
return Result.success(it.data?.body?.map { msg ->
|
return Result.success(it.data?.body?.map { msg ->
|
||||||
val chatType =
|
val chatType =
|
||||||
if (msg.content!!.msgType == 1) MsgConstant.KCHATTYPEC2C else MsgConstant.KCHATTYPEGROUP
|
if (msg.content!!.msgType == 82) MsgConstant.KCHATTYPEGROUP else MsgConstant.KCHATTYPEC2C
|
||||||
MessageDetail(
|
MessageDetail(
|
||||||
time = msg.content?.msgTime?.toInt() ?: 0,
|
time = msg.content?.msgTime?.toInt() ?: 0,
|
||||||
msgType = MessageHelper.obtainDetailTypeByMsgType(chatType),
|
msgType = MessageHelper.obtainDetailTypeByMsgType(chatType),
|
||||||
|
@ -107,7 +107,13 @@ internal object SendForwardMessage : IActionHandler() {
|
|||||||
) else null
|
) else null
|
||||||
),
|
),
|
||||||
content = MessageContent(
|
content = MessageContent(
|
||||||
msgType = record.msgType,
|
msgType = when (record.chatType) {
|
||||||
|
MsgConstant.KCHATTYPEC2C -> 529
|
||||||
|
MsgConstant.KCHATTYPEGROUP -> 82
|
||||||
|
else -> throw UnsupportedOperationException(
|
||||||
|
"Unsupported chatType: $chatType"
|
||||||
|
)
|
||||||
|
},
|
||||||
msgViaRandom = record.msgId,
|
msgViaRandom = record.msgId,
|
||||||
msgSeq = record.msgSeq,
|
msgSeq = record.msgSeq,
|
||||||
msgTime = record.msgTime,
|
msgTime = record.msgTime,
|
||||||
@ -160,7 +166,7 @@ internal object SendForwardMessage : IActionHandler() {
|
|||||||
peerUid = data["uid"]?.asString ?: TicketSvc.getUid()
|
peerUid = data["uid"]?.asString ?: TicketSvc.getUid()
|
||||||
),
|
),
|
||||||
content = MessageContent(
|
content = MessageContent(
|
||||||
msgType = 166,
|
msgType = 529,
|
||||||
msgViaRandom = 4,
|
msgViaRandom = 4,
|
||||||
msgSeq = data["seq"]?.asLong ?: Random.nextLong(),
|
msgSeq = data["seq"]?.asLong ?: Random.nextLong(),
|
||||||
msgTime = data["time"]?.asLong ?: (System.currentTimeMillis() / 1000),
|
msgTime = data["time"]?.asLong ?: (System.currentTimeMillis() / 1000),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user