Skip to content

Commit

Permalink
Create public memberwise initializer for Channel.Message (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
atdrendel authored Nov 30, 2020
1 parent b61ba3f commit cd4128f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/Phoenix/ChannelMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ extension Channel {
public struct Message {
public let event: String
public let payload: Payload

public init(event: String, payload: Payload) {
self.event = event
self.payload = payload
}

init(incomingMessage: IncomingMessage) {
self.event = incomingMessage.event.stringValue
Expand Down

0 comments on commit cd4128f

Please sign in to comment.