We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 910c51f commit 4435811Copy full SHA for 4435811
Sources/PostgreSQL/Message/PostgreSQLNotificationResponse.swift
@@ -2,13 +2,13 @@ import Foundation
2
3
struct PostgreSQLNotificationResponse: Decodable {
4
/// The message coming from PSQL
5
+ let channel: String
6
let message: String
7
init(from decoder: Decoder) throws {
8
let container = try decoder.singleValueContainer()
- _ = try container.decode(Int32.self) // message length
9
- _ = try container.decode(Int32.self) // process id of message
10
- let channelId = try container.decode(String.self)
11
- let message = try? container.decode(String.self)
12
- self.message = message ?? channelId
+ _ = try container.decode(Int32.self)
+ channel = try container.decode(String.self)
+ message = try container.decode(String.self)
+ NSLog("Found self \(channel) \(message)")
13
}
14
0 commit comments