From 58d6cb0ef2773392ce72ae03688585bcca22f0f8 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 19 Apr 2023 12:30:42 -0500 Subject: [PATCH] Delay before sending welcome so Cheogram has time to process the new route --- lib/welcome_message.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/welcome_message.rb b/lib/welcome_message.rb index 07b71208835ff119c44bc1b25a5aac67045d2353..00fbd918509dc0e15db3a8b685f5a3e6d4bade36 100644 --- a/lib/welcome_message.rb +++ b/lib/welcome_message.rb @@ -7,7 +7,10 @@ class WelcomeMessage end def welcome - @customer.stanza_to(message) + EM.promise_timer(10).then do + # Wait for cheogram to get the finish and set up the route + @customer.stanza_to(message) + end end def message