Skip to content

Commit

Permalink
Fix signature of RoomReactions.send(params:)
Browse files Browse the repository at this point in the history
Marat noticed this mistake in 20e7f5f; I got the name of the type wrong
and I forgot to add its properties.
  • Loading branch information
lawrence-forooghian committed Sep 10, 2024
1 parent 48542b7 commit b36db1b
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 b36db1b

Please sign in to comment.