Skip to content

Commit

Permalink
Update CHANGELOG.md (Azure#16671)
Browse files Browse the repository at this point in the history
looks like beta-2 is not yet released
  • Loading branch information
vicancy authored Jul 30, 2021
1 parent 35f86a6 commit 7d4f4aa
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions sdk/web-pubsub/web-pubsub-express/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
# Release History

## 1.0.0-beta.3 (UNRELEASED)
## 1.0.0-beta.3 (2021-07-30)

- Add support to get and set connection state
- Support reading and setting connection states, sample usage:
```js
const handler = new WebPubSubEventHandler("chat", ["https://xxx.webpubsub.azure.com"], {
handleConnect(req, res) {
// You can set the state for the connection, it lasts throughout the lifetime of the connection
res.setState("calledTime", 1);
res.success();
},
handleUserEvent(req, res) {
var calledTime = req.context.states.calledTime++;
console.log(calledTime);
// You can also set the state here
res.setState("calledTime", calledTime);
res.success();
}
});
```

## 1.0.0-beta.2 (2021-07-20)

Expand Down

0 comments on commit 7d4f4aa

Please sign in to comment.