mirror of
https://github.com/WuKongIM/WuKongIMiOSSDK-Framework
synced 2025-03-26 09:37:39 +00:00
feat: upgrade to v1.0.7
This commit is contained in:
parent
c3e39e17c2
commit
9e6169ebf5
@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'WuKongIMSDK'
|
||||
s.version = '1.0.6'
|
||||
s.version = '1.0.7'
|
||||
s.summary = '悟空IM是一款简单,高效,支持完全私有化的即时通讯.'
|
||||
s.license = {"type"=>"MIT", "file"=>"ios/LICENSE"}
|
||||
s.authors = {"tangtaoit"=>"tt@tgo.ai"}
|
||||
|
BIN
ios/WuKongIMSDK.framework/.DS_Store
vendored
BIN
ios/WuKongIMSDK.framework/.DS_Store
vendored
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "WKMessage.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface WKCMDMessage : NSObject
|
||||
@ -29,6 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
// 是否为系统cmd消息
|
||||
-(BOOL) same:(WKCMDMessage*)cmdMessage;
|
||||
|
||||
+(WKCMDMessage*) fromMessage:(WKMessage*)message;
|
||||
|
||||
|
||||
@end
|
||||
|
@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
/**
|
||||
添加媒体委托
|
||||
添加cmd委托
|
||||
|
||||
@param delegate <#delegate description#>
|
||||
*/
|
||||
@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
/**
|
||||
移除媒体委托
|
||||
移除cmd委托
|
||||
|
||||
@param delegate <#delegate description#>
|
||||
*/
|
||||
|
@ -101,6 +101,13 @@ typedef BOOL(^MessageStoreBeforeIntercept)(WKMessage*message);
|
||||
/// 保存消息
|
||||
-(void) saveMessages:(NSArray<WKMessage*>*)messages;
|
||||
|
||||
|
||||
// 添加或更新消息(如果存在则更新,不存在添加)
|
||||
- (void) addOrUpdateMessages:(NSArray<WKMessage*>*)messages;
|
||||
|
||||
// 添加或更新消息(如果存在则更新,不存在添加)
|
||||
// notify 是否通知ui
|
||||
-(void) addOrUpdateMessages:(NSArray<WKMessage*>*)messages notify:(BOOL)notify;
|
||||
/**
|
||||
转发消息
|
||||
|
||||
@ -344,6 +351,9 @@ typedef BOOL(^MessageStoreBeforeIntercept)(WKMessage*message);
|
||||
// 消息编辑提供者
|
||||
@property(nonatomic,copy) WKMessageEditProvider messageEditProvider;
|
||||
|
||||
// 调用消息更新委托
|
||||
- (void)callMessageUpdateDelegate:(WKMessage*)message left:(NSInteger)left total:(NSInteger)total;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
@ -406,6 +416,8 @@ typedef BOOL(^MessageStoreBeforeIntercept)(WKMessage*message);
|
||||
// 流消息
|
||||
-(void) onMessageStream:(WKStream*)stream;
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
@ -42,8 +42,6 @@
|
||||
// 调用消息状态改变委托
|
||||
//- (void)callMessageStatusChangeDelegate:(NSArray<WKMessageStatusModel*>*)statusModels;
|
||||
|
||||
// 调用消息更新委托
|
||||
- (void)callMessageUpdateDelegate:(WKMessage*)message left:(NSInteger)left total:(NSInteger)total;
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +35,8 @@ typedef enum : NSUInteger {
|
||||
@property(nonatomic,assign) WKContentEditUploadStatus uploadStatus; // 上传状态
|
||||
@property(nonatomic,assign) BOOL isMutualDeleted; // 是否双向删除
|
||||
|
||||
@property(nonatomic,assign) BOOL isPinned; // 是否已置顶
|
||||
|
||||
@property(nonatomic,copy) NSDictionary *extra; // 扩展数据
|
||||
|
||||
@end
|
||||
|
27
ios/WuKongIMSDK.framework/Headers/WKPinnedMessage.h
Normal file
27
ios/WuKongIMSDK.framework/Headers/WKPinnedMessage.h
Normal file
@ -0,0 +1,27 @@
|
||||
//
|
||||
// WKPinnedMessage.h
|
||||
// WuKongIMSDK
|
||||
//
|
||||
// Created by tt on 2024/5/22.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "WKChannel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface WKPinnedMessage : NSObject
|
||||
|
||||
@property(nonatomic,assign) uint64_t messageId;
|
||||
@property(nonatomic,assign) uint32_t messageSeq; // 消息序列号(用户唯一,有序)
|
||||
|
||||
@property(nonatomic,strong) WKChannel *channel; // 频道
|
||||
|
||||
@property(nonatomic,assign) BOOL isDeleted; // 消息是否被删除
|
||||
|
||||
@property(nonatomic,assign) uint64_t version;
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
40
ios/WuKongIMSDK.framework/Headers/WKPinnedMessageDB.h
Normal file
40
ios/WuKongIMSDK.framework/Headers/WKPinnedMessageDB.h
Normal file
@ -0,0 +1,40 @@
|
||||
//
|
||||
// WKPinnedMessageDB.h
|
||||
// WuKongIMSDK
|
||||
//
|
||||
// Created by tt on 2024/5/22.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "WKPinnedMessage.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface WKPinnedMessageDB : NSObject
|
||||
|
||||
+ (WKPinnedMessageDB *)shared;
|
||||
|
||||
|
||||
// 通过频道获取置顶的消息集合
|
||||
-(NSArray<WKPinnedMessage*>*) getPinnedMessagesByChannel:(WKChannel*)channel;
|
||||
|
||||
// 获取某个频道的最大version
|
||||
-(uint64_t) getMaxVersion:(WKChannel*)channel;
|
||||
|
||||
// 删除某个频道的所有置顶
|
||||
-(void) deletePinnedByChannel:(WKChannel*)channel;
|
||||
|
||||
// 删除某条消息的置顶
|
||||
-(void) deletePinnedByMessageId:(uint64_t)messageId;
|
||||
|
||||
// 获取某条置顶消息
|
||||
-(WKPinnedMessage*) getPinnedMessageByMessageId:(uint64_t)messageId;
|
||||
|
||||
// 添加或更新置顶消息
|
||||
-(void) addOrUpdatePinnedMessages:(NSArray<WKPinnedMessage*>*)messages;
|
||||
|
||||
// 根据消息id查询是否置顶
|
||||
-(BOOL) hasPinned:(uint64_t)messageId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
60
ios/WuKongIMSDK.framework/Headers/WKPinnedMessageManager.h
Normal file
60
ios/WuKongIMSDK.framework/Headers/WKPinnedMessageManager.h
Normal file
@ -0,0 +1,60 @@
|
||||
//
|
||||
// WKPinnedMessageManager.h
|
||||
// WuKongIMSDK
|
||||
//
|
||||
// Created by tt on 2024/5/22.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "WKPinnedMessage.h"
|
||||
#import "WKMessage.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol WKPinnedMessageManagerDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
// 置顶消息改变
|
||||
-(void) pinnedMessageChange:(WKChannel*)channel;
|
||||
|
||||
@end
|
||||
|
||||
@interface WKPinnedMessageManager : NSObject
|
||||
|
||||
|
||||
/**
|
||||
添加委托
|
||||
|
||||
@param delegate <#delegate description#>
|
||||
*/
|
||||
-(void) addDelegate:(id<WKPinnedMessageManagerDelegate>) delegate;
|
||||
/**
|
||||
移除委托
|
||||
|
||||
@param delegate <#delegate description#>
|
||||
*/
|
||||
-(void)removeDelegate:(id<WKPinnedMessageManagerDelegate>) delegate;
|
||||
|
||||
+ (WKPinnedMessageManager *)shared;
|
||||
|
||||
// 通过频道获取置顶的消息集合
|
||||
-(NSArray<WKMessage*>*) getPinnedMessagesByChannel:(WKChannel*)channel;
|
||||
|
||||
// 获取某个频道的最大version
|
||||
-(uint64_t) getMaxVersion:(WKChannel*)channel;
|
||||
|
||||
// 删除某个频道的所有置顶
|
||||
-(void) deletePinnedByChannel:(WKChannel*)channel;
|
||||
|
||||
// 删除某条消息的置顶
|
||||
-(void) deletePinnedByMessageId:(uint64_t)messageId;
|
||||
|
||||
// 添加或更新置顶消息
|
||||
-(void) addOrUpdatePinnedMessages:(NSArray<WKPinnedMessage*>*)messages;
|
||||
|
||||
// 是否置顶
|
||||
-(BOOL) hasPinned:(uint64_t)messageId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -84,6 +84,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
// 机器人管理者
|
||||
@property(nonatomic,strong) WKRobotManager *robotManager;
|
||||
|
||||
// 置顶消息管理者
|
||||
@property(nonatomic,strong) WKPinnedMessageManager *pinnedMessageManager;
|
||||
|
||||
// 提醒管理者
|
||||
// 负责最近会话的提醒项,比如 有人@我,入群申请等等 还可以自定义一些提醒,比如类似微信的 [红包] [转账] 列表都会有提醒
|
||||
@property(nonatomic,strong) WKReminderManager *reminderManager;
|
||||
@ -93,6 +96,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
// sdk版本号,每次升级记得修改此处
|
||||
@property(nonatomic,copy,readonly) NSString *sdkVersion;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
是否是debug模式
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
#import "WKFMDatabaseQueue.h"
|
||||
#import "WKMessageDB.h"
|
||||
#import "WKMessageExtraDB.h"
|
||||
#import "WKPinnedMessageDB.h"
|
||||
#import "WKReactionDB.h"
|
||||
#import "WKReminderDB.h"
|
||||
#import "WKRobotDB.h"
|
||||
@ -57,6 +58,7 @@
|
||||
#import "WKMediaManager.h"
|
||||
#import "WKMessageQueueManager.h"
|
||||
#import "WKMOSContentConvertManager.h"
|
||||
#import "WKPinnedMessageManager.h"
|
||||
#import "WKReactionManager.h"
|
||||
#import "WKReceiptManager.h"
|
||||
#import "WKReminderManager.h"
|
||||
@ -86,6 +88,7 @@
|
||||
#import "WKMessage.h"
|
||||
#import "WKMessageExtra.h"
|
||||
#import "WKMessageStatusModel.h"
|
||||
#import "WKPinnedMessage.h"
|
||||
#import "WKReaction.h"
|
||||
#import "WKReminder.h"
|
||||
#import "WKRobot.h"
|
||||
|
@ -41,3 +41,5 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#import "WKCoder.h"
|
||||
#import "WKPakcetBodyCoderManager.h"
|
||||
#import "WKChatManager.h"
|
||||
#import "WKPinnedMessageManager.h"
|
||||
#import "WKMessageContent.h"
|
||||
#import "WKConversationManager.h"
|
||||
#import "WKChannelManager.h"
|
||||
|
Binary file not shown.
@ -0,0 +1,17 @@
|
||||
|
||||
alter table `message_extra` add column is_pinned smallint not null default 0; -- 是否置顶
|
||||
|
||||
|
||||
-- 消息扩展表
|
||||
create table pinned_message
|
||||
(
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
message_id UNSIGNED BIG INT not null default 0, -- 消息ID
|
||||
message_seq UNSIGNED BIG INT not null default 0, -- 消息seq
|
||||
channel_id VARCHAR(100) not null default '', -- 频道ID
|
||||
channel_type smallint not null default 0, -- 频道类型
|
||||
version bigint not null default 0, -- 数据版本
|
||||
is_deleted smallint not null default 0 -- 是否已删除
|
||||
);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS idx_pinned_message_id ON pinned_message(message_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_pinned_message_channel ON pinned_message (channel_id, channel_type);
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -108,6 +108,10 @@
|
||||
<data>
|
||||
9uP6U+pAgg/tpjyR2OT/c8HWCsc=
|
||||
</data>
|
||||
<key>202405221231.sql</key>
|
||||
<data>
|
||||
WVIn6nP4jCRX0fm77baWCYzFHmM=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
@ -397,6 +401,17 @@
|
||||
DnYGB5c2gwUT39UvVs+dm8WGAJqOoYLXyxNREHa6QmY=
|
||||
</data>
|
||||
</dict>
|
||||
<key>202405221231.sql</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
WVIn6nP4jCRX0fm77baWCYzFHmM=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
+pBbeamf0pAR/1gZvz7ixR9gUWdhGCRgARHhcVUKh00=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user