Fetch room "listable" attribute.

Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Ivan Sein 2022-03-03 17:51:51 +01:00
Родитель 4a712ffd25
Коммит c9c0693f10
3 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -31,7 +31,7 @@
NSString *const kTalkDatabaseFolder = @"Library/Application Support/Talk";
NSString *const kTalkDatabaseFileName = @"talk.realm";
uint64_t const kTalkDatabaseSchemaVersion = 28;
uint64_t const kTalkDatabaseSchemaVersion = 29;
NSString * const kCapabilitySystemMessages = @"system-messages";
NSString * const kCapabilityNotificationLevels = @"notification-levels";

Просмотреть файл

@ -45,6 +45,12 @@ typedef enum NCRoomReadOnlyState {
NCRoomReadOnlyStateReadOnly
} NCRoomReadOnlyState;
typedef enum NCRoomListableScope {
NCRoomListableScopeParticipantsOnly = 0,
NCRoomListableScopeRegularUsersOnly,
NCRoomListableScopeEveryone
} NCRoomListableScope;
typedef enum NCRoomLobbyState {
NCRoomLobbyStateAllParticipants = 0,
NCRoomLobbyStateModeratorsOnly
@ -94,6 +100,7 @@ extern NSString * const NCRoomObjectTypeSharePassword;
@property (nonatomic, copy) NSString *objectType;
@property (nonatomic, copy) NSString *objectId;
@property (nonatomic, assign) NCRoomReadOnlyState readOnlyState;
@property (nonatomic, assign) NCRoomListableScope listable;
@property (nonatomic, assign) NCRoomLobbyState lobbyState;
@property (nonatomic, assign) NSInteger lobbyTimer;
@property (nonatomic, assign) BOOL sipEnabled;

Просмотреть файл

@ -58,6 +58,7 @@ NSString * const NCRoomObjectTypeSharePassword = @"share:password";
room.objectType = [roomDict objectForKey:@"objectType"];
room.objectId = [roomDict objectForKey:@"objectId"];
room.readOnlyState = (NCRoomReadOnlyState)[[roomDict objectForKey:@"readOnly"] integerValue];
room.listable = (NCRoomListableScope)[[roomDict objectForKey:@"listable"] integerValue];
room.lobbyState = (NCRoomLobbyState)[[roomDict objectForKey:@"lobbyState"] integerValue];
room.lobbyTimer = [[roomDict objectForKey:@"lobbyTimer"] integerValue];
room.sipEnabled = [[roomDict objectForKey:@"sipEnabled"] boolValue];
@ -155,6 +156,7 @@ NSString * const NCRoomObjectTypeSharePassword = @"share:password";
managedRoom.objectType = room.objectType;
managedRoom.objectId = room.objectId;
managedRoom.readOnlyState = room.readOnlyState;
managedRoom.listable = room.listable;
managedRoom.lobbyState = room.lobbyState;
managedRoom.lobbyTimer = room.lobbyTimer;
managedRoom.sipEnabled = room.sipEnabled;