story-kit: merge 322_story_whatsapp_24_hour_messaging_window_and_template_support
This commit is contained in:
@@ -199,9 +199,14 @@ async fn main() -> Result<(), std::io::Error> {
|
||||
.and_then(|root| matrix::BotConfig::load(root))
|
||||
.filter(|cfg| cfg.transport == "whatsapp")
|
||||
.map(|cfg| {
|
||||
let template_name = cfg
|
||||
.whatsapp_notification_template
|
||||
.clone()
|
||||
.unwrap_or_else(|| "pipeline_notification".to_string());
|
||||
let transport = Arc::new(whatsapp::WhatsAppTransport::new(
|
||||
cfg.whatsapp_phone_number_id.clone().unwrap_or_default(),
|
||||
cfg.whatsapp_access_token.clone().unwrap_or_default(),
|
||||
template_name,
|
||||
));
|
||||
let bot_name = cfg
|
||||
.display_name
|
||||
@@ -219,6 +224,7 @@ async fn main() -> Result<(), std::io::Error> {
|
||||
ambient_rooms: Arc::new(std::sync::Mutex::new(std::collections::HashSet::new())),
|
||||
history: std::sync::Arc::new(tokio::sync::Mutex::new(history)),
|
||||
history_size: cfg.history_size,
|
||||
window_tracker: Arc::new(whatsapp::MessagingWindowTracker::new()),
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user