Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public static async buildEscalateCard(turnContext: TurnContext, data: any): Promise {
const response: Activity = ActivityExtensions.createReply(turnContext.activity);
const text: string = i18next.t('escalate.phoneInfo');
response.attachments = [CardFactory.heroCard(
text,
undefined,
[
{
title: i18next.t('escalate.btnText1'),
type: ActionTypes.OpenUrl,
value: i18next.t('escalate.btnValue1')
},
{
title: i18next.t('escalate.btnText2'),
type: ActionTypes.OpenUrl,
value: i18next.t('escalate.btnValue2')
}
]
)];
return Promise.resolve(response);
}
}
public static async buildEscalateCard(turnContext: TurnContext, data: any): Promise {
const response: Activity = ActivityExtensions.createReply(turnContext.activity);
const text: string = i18next.t('escalate.phoneInfo');
response.attachments = [CardFactory.heroCard(
text,
undefined,
[
{
title: i18next.t('escalate.btnText1'),
type: ActionTypes.OpenUrl,
value: i18next.t('escalate.btnValue1')
},
{
title: i18next.t('escalate.btnText2'),
type: ActionTypes.OpenUrl,
value: i18next.t('escalate.btnValue2')
}
]
)];
return Promise.resolve(response);
}
}
response.suggestedActions = {
actions: [
{
title: i18next.t('main.helpBtnText1'),
type: ActionTypes.ImBack,
value: i18next.t('main.helpBtnValue1')
},
{
title: i18next.t('main.helpBtnText2'),
type: ActionTypes.ImBack,
value: i18next.t('main.helpBtnValue2')
},
{
title: i18next.t('main.helpBtnText3'),
type: ActionTypes.OpenUrl,
value: i18next.t('main.helpBtnValue3')
}
],
to: []
};
return Promise.resolve(response);
}
response.suggestedActions = {
actions: [
{
title: i18next.t('main.helpBtnText1'),
type: ActionTypes.ImBack,
value: i18next.t('main.helpBtnValue1')
},
{
title: i18next.t('main.helpBtnText2'),
type: ActionTypes.ImBack,
value: i18next.t('main.helpBtnValue2')
},
{
title: i18next.t('main.helpBtnText3'),
type: ActionTypes.OpenUrl,
value: i18next.t('main.helpBtnValue3')
}
],
to: []
};
return Promise.resolve(response);
}