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.
74 lines
2.3 KiB
Swift
74 lines
2.3 KiB
Swift
3 years ago
|
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
extension OpenGroupAPIV2 {
|
||
|
/// This only contains ephemeral data
|
||
|
public struct RoomPollInfo: Codable {
|
||
|
enum CodingKeys: String, CodingKey {
|
||
|
case token
|
||
|
case created
|
||
|
case name
|
||
|
case description
|
||
|
case imageId = "image_id"
|
||
|
|
||
|
case infoUpdates = "info_updates"
|
||
|
case messageSequence = "message_sequence"
|
||
|
case activeUsers = "active_users"
|
||
|
case activeUsersCutoff = "active_users_cutoff"
|
||
|
case pinnedMessages = "pinned_messages"
|
||
|
|
||
|
case admin
|
||
|
case globalAdmin = "global_admin"
|
||
|
case admins
|
||
|
case hiddenAdmins = "hidden_admins"
|
||
|
|
||
|
case moderator
|
||
|
case globalModerator = "global_moderator"
|
||
|
case moderators
|
||
|
case hiddenModerators = "hidden_moderators"
|
||
|
|
||
|
case read
|
||
|
case defaultRead = "default_read"
|
||
|
case write
|
||
|
case defaultWrite = "default_write"
|
||
|
case upload
|
||
|
case defaultUpload = "default_upload"
|
||
|
|
||
|
case details
|
||
|
}
|
||
|
|
||
|
public let token: String?
|
||
|
public let created: TimeInterval?
|
||
|
public let name: String?
|
||
|
public let description: String?
|
||
|
public let imageId: Int64?
|
||
|
|
||
|
public let infoUpdates: Int64?
|
||
|
public let messageSequence: Int64?
|
||
|
public let activeUsers: Int64?
|
||
|
public let activeUsersCutoff: Int64?
|
||
|
public let pinnedMessages: [PinnedMessage]?
|
||
|
|
||
|
public let admin: Bool?
|
||
|
public let globalAdmin: Bool?
|
||
|
public let admins: [String]?
|
||
|
public let hiddenAdmins: [String]?
|
||
|
|
||
|
public let moderator: Bool?
|
||
|
public let globalModerator: Bool?
|
||
|
public let moderators: [String]?
|
||
|
public let hiddenModerators: [String]?
|
||
|
|
||
|
public let read: Bool?
|
||
|
public let defaultRead: Bool?
|
||
|
public let write: Bool?
|
||
|
public let defaultWrite: Bool?
|
||
|
public let upload: Bool?
|
||
|
public let defaultUpload: Bool?
|
||
|
|
||
|
/// Only populated and different if the `info_updates` counter differs from the provided `info_updated` value
|
||
|
public let details: Room?
|
||
|
}
|
||
|
}
|