Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
`authorizeForward` receives a client object not the clientId
  • Loading branch information
muka authored Nov 9, 2017
1 parent f837a26 commit f9f1bc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ It will be called when a client is set to recieve a message. Override to supply
authorization logic.

```js
instance.authorizeForward = function (clientId, packet) {
if (packet.topic === 'aaaa' && clientId === "I should not see this") {
instance.authorizeForward = function (client, packet) {
if (packet.topic === 'aaaa' && client.id === "I should not see this") {
return null
// also works with return undefined
}
Expand Down

0 comments on commit f9f1bc4

Please sign in to comment.