Skip to content

Commit

Permalink
Spec complete for sending and receiving messages
Browse files Browse the repository at this point in the history
  • Loading branch information
umair-ably committed Oct 8, 2024
2 parents 5f6c651 + 4da8e42 commit 130f399
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion Example/AblyChatExample/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ struct ContentView: View {
func showMessages() async throws {
for await message in try await room().messages.subscribe(bufferingPolicy: .unbounded) {
withAnimation {
messages.insert(BasicListItem(id: message.timeserial, title: message.clientID ?? "Anonymous", text: message.text), at: 0)
messages.insert(BasicListItem(id: message.timeserial, title: message.clientID, text: message.text), at: 0)
}
}
}
Expand Down
15 changes: 0 additions & 15 deletions Sources/AblyChat/EmitsDiscontinuities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,3 @@ import Ably
public protocol EmitsDiscontinuities {
func subscribeToDiscontinuities() async -> Subscription<ARTErrorInfo>
}

/**
* Represents an object that has a channel and therefore may care about discontinuities.
*/
@MainActor
internal protocol HandlesDiscontinuity {
var channel: RealtimeChannelProtocol { get }

// var channel: RealtimeChannelProtocol? { get }
/**
* Called when a discontinuity is detected on the channel.
* @param reason The error that caused the discontinuity.
*/
func discontinuityDetected(reason: ARTErrorInfo?)
}

0 comments on commit 130f399

Please sign in to comment.