Skip to content

Commit

Permalink
KMPFileChangeEvent.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
jguz-pubnub committed Dec 10, 2024
1 parent 66f936a commit 2cd6239
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/PubNub/KMP/Wrappers/KMPFileChangeEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class KMPFileChangeEvent: NSObject {
@objc public let publisher: String?
@objc public let message: KMPAnyJSON?
@objc public let metadata: KMPAnyJSON?
@objc public let customMessageType: String?
@objc public let subscription: String?
@objc public let file: KMPFile

Expand All @@ -36,6 +37,7 @@ public class KMPFileChangeEvent: NSObject {
publisher: fileEvent.publisher,
message: fileEvent.additionalMessage?.codableValue,
metadata: fileEvent.metadata?.codableValue,
customMessageType: fileEvent.customMessageType,
subscription: fileEvent.channelGroup,
file: KMPFile(
from: fileEvent.file,
Expand All @@ -51,6 +53,7 @@ public class KMPFileChangeEvent: NSObject {
publisher: String?,
message: AnyJSON?,
metadata: AnyJSON?,
customMessageType: String?,
subscription: String?,
file: KMPFile
) {
Expand All @@ -59,6 +62,7 @@ public class KMPFileChangeEvent: NSObject {
self.publisher = publisher
self.message = if let message = message { KMPAnyJSON(message) } else { nil }
self.metadata = if let metadata = metadata { KMPAnyJSON(metadata) } else { nil }
self.customMessageType = customMessageType
self.subscription = subscription
self.file = file
}
Expand Down

0 comments on commit 2cd6239

Please sign in to comment.