1# frozen_string_literal: true
2
3class WelcomeMessage
4 def initialize(customer, tel)
5 @customer = customer
6 @tel = tel
7 end
8
9 def welcome
10 @customer.stanza_to(message)
11 end
12
13 def message
14 m = Blather::Stanza::Message.new
15 m.from = CONFIG[:notify_from]
16 m.body =
17 "Welcome to JMP! Your JMP number is #{@tel}. This is an automated " \
18 "message, but anything you send here will go direct to real humans " \
19 "who will be happy to help you. Such support requests will get a " \
20 "reply within 8 business hours.\n\n" \
21 "FAQ: https://jmp.chat/faq\n\n" \
22 "Account Settings: xmpp:cheogram.com?command"
23 m
24 end
25end