Skip to content

Commit

Permalink
Nil values to optional params
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmitrevski committed Nov 11, 2024
1 parent 3582c13 commit a440187
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public final class CallClosedCaption: @unchecked Sendable, Codable, JSONEncodabl
public var text: String
public var user: UserResponse?

public init(endTime: Date, speakerId: String, startTime: Date, text: String, user: UserResponse?) {
public init(endTime: Date, speakerId: String, startTime: Date, text: String, user: UserResponse? = nil) {
self.endTime = endTime
self.speakerId = speakerId
self.startTime = startTime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public final class CallEvent: @unchecked Sendable, Codable, JSONEncodable, Hasha
description: String,
endTimestamp: Int,
issueTags: [String]? = nil,
kind: String?,
kind: String? = nil,
severity: Int,
timestamp: Int,
type: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public final class CallResponse: @unchecked Sendable, Codable, JSONEncodable, Ha
public init(
backstage: Bool,
blockedUserIds: [String],
captioning: Bool?,
captioning: Bool? = nil,
cid: String,
createdAt: Date,
createdBy: UserResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public final class UserInfoResponse: @unchecked Sendable, Codable, JSONEncodable
public var name: String
public var roles: [String]

public init(custom: [String: RawJSON], id: String?, image: String, name: String, roles: [String]) {
public init(custom: [String: RawJSON], id: String? = nil, image: String, name: String, roles: [String]) {
self.custom = custom
self.id = id
self.image = image
Expand Down

0 comments on commit a440187

Please sign in to comment.