From 41fcd333ab5ca74c7524d410539446359ebdacc9 Mon Sep 17 00:00:00 2001 From: Muzzammil Shahid Date: Mon, 8 Jul 2024 19:05:13 +0500 Subject: [PATCH] Adapt to latest changes in wampproto --- lib/src/helpers.dart | 8 ++++---- lib/src/joiner.dart | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/helpers.dart b/lib/src/helpers.dart index c59cdfb..c770e6f 100644 --- a/lib/src/helpers.dart +++ b/lib/src/helpers.dart @@ -19,12 +19,12 @@ String getSubProtocol(Serializer serializer) { String wampErrorString(Error err) { String errStr = err.uri; - if (err.args.isNotEmpty) { - String args = err.args.map((arg) => arg.toString()).join(", "); + if (err.args != null) { + String args = err.args!.map((arg) => arg.toString()).join(", "); errStr += ": $args"; } - if (err.kwargs.isNotEmpty) { - String kwargs = err.kwargs.entries.map((entry) => "${entry.key}=${entry.value}").join(", "); + if (err.kwargs != null) { + String kwargs = err.kwargs!.entries.map((entry) => "${entry.key}=${entry.value}").join(", "); errStr += ": $kwargs"; } return errStr; diff --git a/lib/src/joiner.dart b/lib/src/joiner.dart index 54240a6..716d918 100644 --- a/lib/src/joiner.dart +++ b/lib/src/joiner.dart @@ -23,7 +23,7 @@ class WAMPSessionJoiner { WebSocketChannel channel = webSocketChannel(uri, getSubProtocol(_serializer)); await channel.ready; - final joiner = Joiner(realm, _serializer, _authenticator); + final joiner = Joiner(realm, serializer: _serializer, authenticator: _authenticator); channel.sink.add(joiner.sendHello()); var welcomeCompleter = Completer();