Skip to content

Commit

Permalink
Merge pull request #42 from ably-labs/fix-send-reaction-signature
Browse files Browse the repository at this point in the history
Fix signature of `RoomReactions.send(params:)`
  • Loading branch information
lawrence-forooghian authored Sep 10, 2024
2 parents 48542b7 + b36db1b commit 9014b0c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Sources/AblyChat/RoomReactions.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import Ably

public protocol RoomReactions: AnyObject, Sendable, EmitsDiscontinuities {
func send(params: RoomReactionParams) async throws
func send(params: SendReactionParams) async throws
func subscribe(bufferingPolicy: BufferingPolicy) -> Subscription<Reaction>
var channel: ARTRealtimeChannelProtocol { get }
}

public struct RoomReactionParams: Sendable {
public init() {}
public struct SendReactionParams: Sendable {
public var type: String
public var metadata: ReactionMetadata?
public var headers: ReactionHeaders?

public init(type: String, metadata: ReactionMetadata? = nil, headers: ReactionHeaders? = nil) {
self.type = type
self.metadata = metadata
self.headers = headers
}
}

0 comments on commit 9014b0c

Please sign in to comment.