From 5921b509e178d1d8e276702deec3b365f012ea8c Mon Sep 17 00:00:00 2001 From: tangtaoit Date: Fri, 8 Sep 2023 20:35:49 +0800 Subject: [PATCH] fix: #1 --- WuKongIMSDK/Classes/db/WKMessageDB.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WuKongIMSDK/Classes/db/WKMessageDB.m b/WuKongIMSDK/Classes/db/WKMessageDB.m index 327e394..8ae01ac 100644 --- a/WuKongIMSDK/Classes/db/WKMessageDB.m +++ b/WuKongIMSDK/Classes/db/WKMessageDB.m @@ -215,7 +215,7 @@ + (WKMessageDB *)shared }else{ orderSeq = [self getMaxOrderSeqWithChannel:db channel:message.channel]+1; } - bool success = [db executeUpdate:SQL_MESSAGE_SAVE,@(message.messageId),@(message.messageSeq),@(orderSeq),message.clientMsgNo?:@"",message.streamNo?:@"",@(message.timestamp),message.fromUid?:@"",message.toUid?:@"",message.channel.channelId?:@"",@(message.channel.channelType),@(message.content.realContentType),message.contentData?:@"",searchableWord?:@"",@(message.voiceReaded),@(message.status),@(message.reasonCode),[self extraToStr:message.extra],@([message.setting toUint8]),@(message.content.flame),@(message.content.flameSecond),@(message.viewed),@(message.viewedAt),@(message.isDeleted)]; + bool success = [db executeUpdate:SQL_MESSAGE_SAVE,@(message.messageId),@(message.messageSeq),@(orderSeq),message.clientMsgNo?:@"",message.streamNo?:@"",@(message.timestamp),message.fromUid?:@"",message.toUid?:@"",message.channel.channelId?:@"",@(message.channel.channelType),@(message.contentType),message.contentData?:@"",searchableWord?:@"",@(message.voiceReaded),@(message.status),@(message.reasonCode),[self extraToStr:message.extra],@([message.setting toUint8]),@(message.content.flame),@(message.content.flameSecond),@(message.viewed),@(message.viewedAt),@(message.isDeleted)]; if(success) { message.clientSeq = (uint32_t)db.lastInsertRowId; @@ -291,7 +291,7 @@ -(BOOL) insertMessage:(WKMessage*)message db:(FMDatabase*)db clientMsgNo:(NSStri orderSeq = message.messageSeq*WKOrderSeqFactor; } - return [db executeUpdate:SQL_MESSAGE_SAVE,@(message.messageId),@(message.messageSeq),@(orderSeq),clientMsgNo,message.streamNo?:@"",@(message.timestamp),message.fromUid?:@"",message.toUid?:@"",message.channel.channelId?:@"",@(message.channel.channelType),@(message.content.realContentType),message.contentData?:@"",searchableWord?:@"",@(message.voiceReaded),@(message.status),@(message.reasonCode),[self extraToStr:message.extra],@([message.setting toUint8]),@(message.content.flame),@(message.content.flameSecond),@(message.viewed),@(message.viewedAt),@(isDeleted)]; + return [db executeUpdate:SQL_MESSAGE_SAVE,@(message.messageId),@(message.messageSeq),@(orderSeq),clientMsgNo,message.streamNo?:@"",@(message.timestamp),message.fromUid?:@"",message.toUid?:@"",message.channel.channelId?:@"",@(message.channel.channelType),@(message.contentType),message.contentData?:@"",searchableWord?:@"",@(message.voiceReaded),@(message.status),@(message.reasonCode),[self extraToStr:message.extra],@([message.setting toUint8]),@(message.content.flame),@(message.content.flameSecond),@(message.viewed),@(message.viewedAt),@(isDeleted)]; } -(BOOL) existMessage:(uint64_t)messageId db:(FMDatabase*)db{