From f287d501ab861a7766184d85664c7d036deac439 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Wed, 4 Oct 2023 22:15:24 +0200 Subject: [PATCH] fix(example): Comform examples to the new TCPSocketWrapper constructor --- examples_dart/bin/component.dart | 2 ++ examples_dart/bin/omemo_client.dart | 2 +- examples_dart/lib/socket.dart | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples_dart/bin/component.dart b/examples_dart/bin/component.dart index 41d60ec..4208198 100644 --- a/examples_dart/bin/component.dart +++ b/examples_dart/bin/component.dart @@ -3,6 +3,8 @@ import 'package:moxxmpp/moxxmpp.dart'; import 'package:moxxmpp_socket_tcp/moxxmpp_socket_tcp.dart'; class TestingTCPSocketWrapper extends TCPSocketWrapper { + TestingTCPSocketWrapper() : super(true); + @override bool onBadCertificate(dynamic certificate, String domain) { return true; diff --git a/examples_dart/bin/omemo_client.dart b/examples_dart/bin/omemo_client.dart index 5241d03..191c3e4 100644 --- a/examples_dart/bin/omemo_client.dart +++ b/examples_dart/bin/omemo_client.dart @@ -30,7 +30,7 @@ void main(List args) async { TestingReconnectionPolicy(), AlwaysConnectedConnectivityManager(), ClientToServerNegotiator(), - ExampleTCPSocketWrapper(parser.srvRecord), + ExampleTCPSocketWrapper(parser.srvRecord, true), )..connectionSettings = parser.connectionSettings; // Generate OMEMO data diff --git a/examples_dart/lib/socket.dart b/examples_dart/lib/socket.dart index 3031050..8f217df 100644 --- a/examples_dart/lib/socket.dart +++ b/examples_dart/lib/socket.dart @@ -3,7 +3,7 @@ import 'package:moxxmpp_socket_tcp/moxxmpp_socket_tcp.dart'; /// A simple socket for examples that allows injection of SRV records (since /// we cannot use moxdns here). class ExampleTCPSocketWrapper extends TCPSocketWrapper { - ExampleTCPSocketWrapper(this.srvRecord); + ExampleTCPSocketWrapper(this.srvRecord, bool logData) : super(logData); /// A potential SRV record to inject for testing. final MoxSrvRecord? srvRecord;