[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,7 +224,11 @@ 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
// notify that friend had downloaded the file.
if (msgNotOnline.subcmd == 2) return
collect( collect(
FriendFileMessageImpl( FriendFileMessageImpl(
sub0x4.msgNotOnlineFile.fileUuid.decodeToString(), sub0x4.msgNotOnlineFile.fileUuid.decodeToString(),
@ -233,7 +237,6 @@ internal class FileMessageProtocol : MessageProtocol() {
sub0x4.msgNotOnlineFile.fileMd5 sub0x4.msgNotOnlineFile.fileMd5
) )
) )
}
return return
} }
} }