Skip to content

Commit

Permalink
Rename query sorting types and properties
Browse files Browse the repository at this point in the history
This is in line with an SDK divergence decision which is logged in [1].
People were not happy with the JS naming and hence we decided to change
it to this. The intention is that this change will find its way back
into the JS SDK.

[1] https://ably.atlassian.net/wiki/spaces/CHA/pages/3307405320/SDK+Divergence+Decision+Log
  • Loading branch information
lawrence-forooghian committed Aug 28, 2024
1 parent 20e7f5f commit 8e31d2e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/AblyChat/Messages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ public struct SendMessageParams: Sendable {
}

public struct QueryOptions: Sendable {
public enum Direction: Sendable {
case forwards
case backwards
public enum ResultOrder: Sendable {
case oldestFirst
case newestFirst
}

public var start: Date?
public var end: Date?
public var limit: Int?
public var direction: Direction?
public var orderBy: ResultOrder?

public init(start: Date? = nil, end: Date? = nil, limit: Int? = nil, direction: QueryOptions.Direction? = nil) {
public init(start: Date? = nil, end: Date? = nil, limit: Int? = nil, orderBy: QueryOptions.ResultOrder? = nil) {
self.start = start
self.end = end
self.limit = limit
self.direction = direction
self.orderBy = orderBy
}
}

Expand Down

0 comments on commit 8e31d2e

Please sign in to comment.