diff --git a/CHANGELOG.md b/CHANGELOG.md index c7f4fe3f..6361f7a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 2.0.3 +* Remove `WebSocketController.plugin`. + # 2.0.2 * Update `stream_channel` to `2.0.0`. * Use `angel_framework^@2.0.0-rc.0`. diff --git a/lib/websocket_controller.dart b/lib/websocket_controller.dart index 1a0b0eb6..ad577484 100644 --- a/lib/websocket_controller.dart +++ b/lib/websocket_controller.dart @@ -9,19 +9,17 @@ class ExposeWs { /// A special controller that also supports WebSockets. class WebSocketController extends Controller { + /// The plug-in instance powering this controller. final AngelWebSocket ws; Map _handlers = {}; Map _handlerSymbols = {}; - /// The plug-in instance powering this controller. - AngelWebSocket plugin; - WebSocketController(this.ws) : super(); /// Sends an event to all clients. void broadcast(String eventName, data, {filter(WebSocketContext socket)}) { - plugin.batchEvent(new WebSocketEvent(eventName: eventName, data: data), + ws.batchEvent(new WebSocketEvent(eventName: eventName, data: data), filter: filter); } diff --git a/pubspec.yaml b/pubspec.yaml index 507e0f2e..91d16906 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: angel_websocket description: Support for using pkg:angel_client with WebSockets. Designed for Angel. environment: sdk: ">=2.0.0-dev <3.0.0" -version: 2.0.2 +version: 2.0.3 author: Tobe O homepage: https://github.com/angel-dart/angel_websocket dependencies: