[core] ignore file downloaded message

This commit is contained in:
StageGuard 2023-09-02 09:32:45 +08:00
parent 69b0bf8b80
commit ea02835ad2
No known key found for this signature in database
GPG Key ID: F6FF8760A883492B

View File

@ -224,16 +224,19 @@ internal class FileMessageProtocol : MessageProtocol() {
if (originalMsg != null && originalMsg.msgHead.msgType == 529) { if (originalMsg != null && originalMsg.msgHead.msgType == 529) {
markAsConsumed() markAsConsumed()
val sub0x4 = originalMsg.msgBody.msgContent.loadAs(SubMsgType0x4.MsgBody.serializer()) val sub0x4 = originalMsg.msgBody.msgContent.loadAs(SubMsgType0x4.MsgBody.serializer())
if (sub0x4.msgNotOnlineFile != null) { val msgNotOnline = sub0x4.msgNotOnlineFile ?: return
collect(
FriendFileMessageImpl( // notify that friend had downloaded the file.
sub0x4.msgNotOnlineFile.fileUuid.decodeToString(), if (msgNotOnline.subcmd == 2) return
sub0x4.msgNotOnlineFile.fileName.decodeToString(),
sub0x4.msgNotOnlineFile.fileSize, collect(
sub0x4.msgNotOnlineFile.fileMd5 FriendFileMessageImpl(
) sub0x4.msgNotOnlineFile.fileUuid.decodeToString(),
sub0x4.msgNotOnlineFile.fileName.decodeToString(),
sub0x4.msgNotOnlineFile.fileSize,
sub0x4.msgNotOnlineFile.fileMd5
) )
} )
return return
} }
} }