mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Objective-C
		
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Objective-C
		
	
| //
 | |
| //  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
 | |
| //
 | |
| 
 | |
| #import <UIKit/UIKit.h>
 | |
| #import <SessionUtilitiesKit/TSYapDatabaseObject.h>
 | |
| 
 | |
| NS_ASSUME_NONNULL_BEGIN
 | |
| 
 | |
| typedef NS_ENUM(NSInteger, GroupType) {
 | |
|     closedGroup = 0,
 | |
|     openGroup = 1,
 | |
| };
 | |
| 
 | |
| extern const int32_t kGroupIdLength;
 | |
| 
 | |
| @interface TSGroupModel : TSYapDatabaseObject
 | |
| 
 | |
| @property (nonatomic) NSArray<NSString *> *groupMemberIds;
 | |
| @property (nonatomic) NSArray<NSString *> *groupAdminIds;
 | |
| @property (nullable, readonly, nonatomic) NSString *groupName;
 | |
| @property (readonly, nonatomic) NSData *groupId;
 | |
| @property (nonatomic) GroupType groupType;
 | |
| @property (nonatomic) NSMutableSet<NSString *> *removedMembers;
 | |
| 
 | |
| #if TARGET_OS_IOS
 | |
| @property (nullable, nonatomic, strong) UIImage *groupImage;
 | |
| 
 | |
| - (instancetype)initWithTitle:(nullable NSString *)title
 | |
|                     memberIds:(NSArray<NSString *> *)memberIds
 | |
|                         image:(nullable UIImage *)image
 | |
|                       groupId:(NSData *)groupId
 | |
|                     groupType:(GroupType)groupType
 | |
|                      adminIds:(NSArray<NSString *> *)adminIds;
 | |
| 
 | |
| - (BOOL)isEqual:(id)other;
 | |
| - (BOOL)isEqualToGroupModel:(TSGroupModel *)model;
 | |
| - (NSString *)getInfoStringAboutUpdateTo:(TSGroupModel *)model;
 | |
| - (void)updateGroupId: (NSData *)newGroupId;
 | |
| #endif
 | |
| 
 | |
| @end
 | |
| 
 | |
| NS_ASSUME_NONNULL_END
 |