Skip to content

Commit 9a2b2d8

Browse files
committed
Removing onPostActivity per CR feedback.
1 parent 9c87aa3 commit 9a2b2d8

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/directLine.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,12 @@ export interface IBotConnection {
288288
end(): void,
289289
referenceGrammarId?: string,
290290
postActivity(activity: Activity): Observable<string>,
291-
getSessionId(): Observable<string>,
292-
onPostActivity: Observable<Activity>
291+
getSessionId(): Observable<string>
293292
}
294293

295294
export class DirectLine implements IBotConnection {
296295
public connectionStatus$ = new BehaviorSubject(ConnectionStatus.Uninitialized);
297296
public activity$: Observable<Activity>;
298-
public onPostActivity: Observable<Activity>;
299-
private onPostActivitySubject: Subject<Activity>;
300297

301298
private domain = "https://directline.botframework.com/v3/directline";
302299
private webSocket;
@@ -317,9 +314,6 @@ export class DirectLine implements IBotConnection {
317314
this.token = options.secret || options.token;
318315
this.webSocket = (options.webSocket === undefined ? true : options.webSocket) && typeof WebSocket !== 'undefined' && WebSocket !== undefined;
319316

320-
this.onPostActivitySubject = new Subject<Activity>();
321-
this.onPostActivity = this.onPostActivitySubject.asObservable();
322-
323317
if (options.domain)
324318
this.domain = options.domain;
325319
if (options.conversationId) {
@@ -509,8 +503,6 @@ export class DirectLine implements IBotConnection {
509503
}
510504

511505
postActivity(activity: Activity) {
512-
this.onPostActivitySubject.next(activity);
513-
514506
// Use postMessageWithAttachments for messages with attachments that are local files (e.g. an image to upload)
515507
// Technically we could use it for *all* activities, but postActivity is much lighter weight
516508
// So, since WebChat is partially a reference implementation of Direct Line, we implement both.

0 commit comments

Comments
 (0)