diff --git a/.gitignore b/.gitignore index 4191ae6d..1403b417 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,49 @@ doc/api/ pubspec.lock .idea -log.txt \ No newline at end of file +log.txt +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff: +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/dictionaries + +# Sensitive or high-churn files: +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.xml +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml + +# Gradle: +.idea/**/gradle.xml +.idea/**/libraries + +# Mongo Explorer plugin: +.idea/**/mongoSettings.xml + +## File-based project format: +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + diff --git a/README.md b/README.md index f4083945..245e8eca 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # angel_websocket -[![1.0.4+1](https://img.shields.io/badge/pub-1.0.4+1-brightgreen.svg)](https://pub.dartlang.org/packages/angel_websocket) +[![1.0.4+2](https://img.shields.io/badge/pub-1.0.4+2-brightgreen.svg)](https://pub.dartlang.org/packages/angel_websocket) [![build status](https://travis-ci.org/angel-dart/websocket.svg)](https://travis-ci.org/angel-dart/websocket) WebSocket plugin for Angel. diff --git a/lib/browser.dart b/lib/browser.dart index e0527938..b7ab6910 100644 --- a/lib/browser.dart +++ b/lib/browser.dart @@ -55,7 +55,7 @@ class WebSockets extends BaseWebSocketClient { @override Future getConnectedWebSocket() { - var socket = new WebSocket(authToken?.isNotEmpty == true ? basePath : '$basePath?token=$authToken'); + var socket = new WebSocket(authToken?.isNotEmpty == true ? '$basePath?token=$authToken' : basePath ); var completer = new Completer(); socket diff --git a/lib/websocket_controller.dart b/lib/websocket_controller.dart index eb0fbc75..c0d3db12 100644 --- a/lib/websocket_controller.dart +++ b/lib/websocket_controller.dart @@ -67,6 +67,7 @@ class WebSocketController extends Controller { socket.onData.listen((data) => onData(data, socket)); socket.onAction.listen((WebSocketAction action) async { + socket.request.inject(WebSocketAction, action); await onAction(action, socket); if (_handlers.containsKey(action.eventName)) { diff --git a/pubspec.yaml b/pubspec.yaml index 0dc79adc..0f4f4bf8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: angel_websocket description: WebSocket plugin for Angel. environment: sdk: ">=1.19.0" -version: 1.0.4+1 +version: 1.0.4+2 author: Tobe O homepage: https://github.com/angel-dart/angel_websocket dependencies: