Skip to content

Commit 9274ba6

Browse files
author
Bill Barnes
committed
share activity$
1 parent e1be224 commit 9274ba6

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "botframework-directlinejs",
3-
"version": "0.9.0",
3+
"version": "0.9.2",
44
"description": "client library for the Microsoft Bot Framework Direct Line 3.0 protocol",
55
"main": "built/directLine.js",
66
"types": "built/directLine.d.ts",

src/directLine.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import 'rxjs/add/operator/filter';
1515
import 'rxjs/add/operator/map';
1616
import 'rxjs/add/operator/mergeMap';
1717
import 'rxjs/add/operator/retryWhen';
18+
import 'rxjs/add/operator/share';
1819
import 'rxjs/add/operator/take';
1920

2021
import 'rxjs/add/observable/dom/ajax';
@@ -278,9 +279,10 @@ export class DirectLine implements IBotConnection {
278279
if (options.pollingInterval !== undefined)
279280
this.pollingInterval = options.pollingInterval;
280281

281-
this.activity$ = this.webSocket && typeof WebSocket !== 'undefined' && WebSocket
282+
this.activity$ = (this.webSocket && typeof WebSocket !== 'undefined' && WebSocket
282283
? this.webSocketActivity$()
283-
: this.pollingGetActivity$();
284+
: this.pollingGetActivity$()
285+
).share();
284286
}
285287

286288
// Every time we're about to make a Direct Line REST call, we call this first to see check the current connection status.

0 commit comments

Comments
 (0)