diligenceengine/clj-browserchannel — pull request #7 by gered (2014-12-19 23:14:16+00:00)
Title: pass incoming browserchannel message request maps to listeners

The request map originating from incoming messages from clients is available in pretty much every place where a listener is invoked (except obviously for a :close event not originating from a client action), so it would be handy to have this passed to the listener function to allow application code to use this (e.g. to use up to date session data, cookies ... ).

Note that this change is not backwards compatible, as the request map now is always the first argument passed to listener functions. However, this is a very minor change to make in application code.

Before:

```clojure
(browserchannel/add-listener
session-id
:map
(fn [m]
; ...
))

(browserchannel/add-listener
session-id
:close
(fn [reason]
; ...
))
```

After:

```clojure
(browserchannel/add-listener
session-id
:map
(fn [request m]
; ...
))

(browserchannel/add-listener
session-id
:close
(fn [request reason]
; ...
))
```