Skip to content

Commit 5e08816

Browse files
authored
Add busy status capability (#189)
Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
1 parent 3353eac commit 5e08816

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Sources/NextcloudKit/NextcloudKit+Capabilities.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,13 @@ public extension NextcloudKit {
301301
struct UserStatus: Codable {
302302
let enabled: Bool?
303303
let restore: Bool?
304-
let supportsemoji: Bool?
304+
let supportsEmoji: Bool?
305+
let supportsBusy: Bool?
305306

306307
enum CodingKeys: String, CodingKey {
307308
case enabled, restore
308-
case supportsemoji = "supports_emoji"
309+
case supportsEmoji = "supports_emoji"
310+
case supportsBusy = "supports_busy"
309311
}
310312
}
311313

@@ -392,6 +394,8 @@ public extension NextcloudKit {
392394
capabilities.filesBigfilechunking = json.files?.bigfilechunking ?? false
393395

394396
capabilities.userStatusEnabled = json.userstatus?.enabled ?? false
397+
capabilities.userStatusSupportsBusy = json.userstatus?.supportsBusy ?? false
398+
395399
capabilities.externalSites = json.external != nil
396400
capabilities.groupfoldersEnabled = json.groupfolders?.hasGroupFolders ?? false
397401

@@ -472,6 +476,7 @@ final public class NKCapabilities: Sendable {
472476
public var filesComments: Bool = false // NC 20
473477
public var filesBigfilechunking: Bool = false
474478
public var userStatusEnabled: Bool = false
479+
public var userStatusSupportsBusy: Bool = false
475480
public var externalSites: Bool = false
476481
public var activityEnabled: Bool = false
477482
public var groupfoldersEnabled: Bool = false // NC27

0 commit comments

Comments
 (0)