Forum Discussion
voonsionglum
Dec 07, 2020Brass Contributor
onInstallationUpdate, onInstallationUpdateAdd and onInstallationUpdateRemove event handlers
Hi, I'd like to know how the following methods are triggered: onInstallationUpdate, onInstallationUpdateAdd, onInstallationUpdateRemove We updated our botbuilder-core package to 4.11.0. In our...
MarekSolvingTeamsIssue
Apr 19, 2023Copper Contributor
Your code does something else that it should.. the binding there is not allowed.
You would do either
this.onInstallationUpdate(this.botHandler1);
this.onInstallationUpdateAdd(this.botHandler1);
this.onInstallationUpdateRemove(this.botHandler1);
private botHandler1 = async (context: TurnContext, next: () => Promise<void>): Promise<any> => {
console.log('what happened? ', context.activity.name);
await next();
};
Or either override activity methods like:protected onInstallationUpdateAddActivity(context: TurnContext): Promise<void> { console.log('on installation add activity ', context.activity); return super.onInstallationUpdateAddActivity(context); }
override onInstallationUpdateAddActivity(context: TurnContext): Promise<void> {
console.log('on installation add activity ', context.activity);
return super.onInstallationUpdateAddActivity(context);
}
Hope this will solve your issue 2 years after you've dealt with it 🙂