Skip to content

Commit

Permalink
Replace type parameter with customMessageType in PubNubMessage constr…
Browse files Browse the repository at this point in the history
…uctor
  • Loading branch information
jguz-pubnub committed Oct 22, 2024
1 parent 3c0e164 commit 90d49a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sources/PubNub/Models/PubNubMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public struct PubNubMessageBase: PubNubMessage, Codable, Hashable {
subscription: other.subscription,
published: other.published,
metadata: other.metadata?.codableValue,
type: other.customMessageType,
customMessageType: other.customMessageType,
messageType: other.messageType,
error: other.error
)
Expand All @@ -129,7 +129,7 @@ public struct PubNubMessageBase: PubNubMessage, Codable, Hashable {
subscription: subscribe.subscription,
published: subscribe.publishTimetoken.timetoken,
metadata: subscribe.metadata,
type: subscribe.customMessageType,
customMessageType: subscribe.customMessageType,
messageType: subscribe.messageType.asPubNubMessageType,
error: subscribe.error
)
Expand All @@ -150,7 +150,7 @@ public struct PubNubMessageBase: PubNubMessage, Codable, Hashable {
subscription: nil,
published: history.timetoken,
metadata: history.meta,
type: history.customMessageType,
customMessageType: history.customMessageType,
messageType: history.messageType?.asPubNubMessageType ?? .unknown,
error: history.error
)
Expand All @@ -164,7 +164,7 @@ public struct PubNubMessageBase: PubNubMessage, Codable, Hashable {
subscription: String?,
published: Timetoken,
metadata: AnyJSON?,
type: String? = nil,
customMessageType: String? = nil,
messageType: PubNubMessageType = .unknown,
error: PubNubError? = nil
) {
Expand All @@ -176,7 +176,7 @@ public struct PubNubMessageBase: PubNubMessage, Codable, Hashable {
self.published = published
self.concreteMetadata = metadata
self.messageType = messageType
self.customMessageType = type
self.customMessageType = customMessageType
self.error = error
}

Expand Down

0 comments on commit 90d49a8

Please sign in to comment.