Skip to content

Commit

Permalink
refactor: Fix typo and make callParticipantChangedHandler optional (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisamir98 committed Jul 27, 2020
1 parent fa15d9d commit 043978c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/bot-handler-avs/src/AVSHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class AVSHandler extends MessageHandler {
wCall: Wcall,
selfUserId: string,
selfClientId: string,
callPrticipantChangedHandler: WcallParticipantChangedHandler = () => {},
callParticipantChangedHandler?: WcallParticipantChangedHandler,
): number => {
/* cspell:disable */
const wUser = wCall.create(
Expand All @@ -179,7 +179,10 @@ export class AVSHandler extends MessageHandler {
() => {}, // vstateh
);

wCall.setParticipantChangedHandler(wUser, callPrticipantChangedHandler);
if (callParticipantChangedHandler) {
wCall.setParticipantChangedHandler(wUser, callParticipantChangedHandler);
}

return wUser;
};

Expand Down

0 comments on commit 043978c

Please sign in to comment.