Skip to content

Commit

Permalink
Merge pull request #41 from muzzammilshahid/default-options
Browse files Browse the repository at this point in the history
Change default options to empty map in register and subscribe
  • Loading branch information
muzzammilshahid authored Oct 23, 2024
2 parents 9f45aba + 94c3ad3 commit cd4c315
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/io/xconn/wampproto/messages/Register.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class Register : Message {
constructor(
requestID: Long,
uri: String,
options: Map<String, Any>? = null,
options: Map<String, Any> = emptyMap(),
) {
registerFields = RegisterFields(requestID, uri, options ?: emptyMap())
registerFields = RegisterFields(requestID, uri, options)
}

constructor(fields: RegisterFields) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/io/xconn/wampproto/messages/Subscribe.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class Subscribe : Message {
constructor(
requestID: Long,
topic: String,
options: Map<String, Any>? = null,
options: Map<String, Any> = emptyMap(),
) {
subscribeFields = SubscribeFields(requestID, topic, options ?: emptyMap())
subscribeFields = SubscribeFields(requestID, topic, options)
}

constructor(fields: SubscribeFields) {
Expand Down

0 comments on commit cd4c315

Please sign in to comment.