From 695bfed349dbd92a5dc44016b8536f586c1b8468 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Tue, 1 Apr 2025 16:30:08 +0300 Subject: [PATCH] feat: send invites when a recipient is not resolved --- handlers/application/menuhandler.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/handlers/application/menuhandler.go b/handlers/application/menuhandler.go index 13d1315..f634109 100644 --- a/handlers/application/menuhandler.go +++ b/handlers/application/menuhandler.go @@ -1715,12 +1715,12 @@ func (h *MenuHandlers) InviteValidRecipient(ctx context.Context, sym string, inp return res, fmt.Errorf("Data error encountered") } - // TODO - // send an invitation SMS - // if successful - // res.Content = l.Get("Your invitation to %s to join Sarafu Network has been sent.", string(recipient)) - - res.Content = l.Get("Your invite request for %s to Sarafu Network failed. Please try again later.", string(recipient)) + _, err := h.accountService.SendUpsellSMS(ctx, sessionId, string(recipient)) + if err != nil { + res.Content = l.Get("Your invite request for %s to Sarafu Network failed. Please try again later.", string(recipient)) + return res, nil + } + res.Content = l.Get("Your invitation to %s to join Sarafu Network has been sent.", string(recipient)) return res, nil }