Add sessionHolding template, unique 8-digit codes, reason slot for sessionCancelled, and disable unused notifications
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
const { pickNotifyFlags } = require('./notifyFlags');
|
||||
const { getActionChannelFlags } = require('./notificationSettings');
|
||||
|
||||
/**
|
||||
* Combines per-request notify flags (from admin forms) with dashboard per-action settings.
|
||||
*/
|
||||
const resolveNotifyFlags = async (source = {}, actionKey) => {
|
||||
const request = pickNotifyFlags(source);
|
||||
const dashboard = await getActionChannelFlags(actionKey);
|
||||
|
||||
return {
|
||||
sms: request.sms && dashboard.sms,
|
||||
email: request.email && dashboard.email,
|
||||
bot: request.bot && dashboard.bot
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
resolveNotifyFlags
|
||||
};
|
||||
Reference in New Issue
Block a user