diff --git a/getting-started/sms/respond-to-incoming-message/server/src/main/java/com/mycompany/app/Config.java b/getting-started/sms/respond-to-incoming-message/server/src/main/java/com/mycompany/app/Config.java index 7644873..be44878 100644 --- a/getting-started/sms/respond-to-incoming-message/server/src/main/java/com/mycompany/app/Config.java +++ b/getting-started/sms/respond-to-incoming-message/server/src/main/java/com/mycompany/app/Config.java @@ -30,7 +30,6 @@ public SinchClient sinchClient() { if (!StringUtil.isEmpty(projectId)) { builder.setProjectId(projectId); } - if (!StringUtil.isEmpty(keyId)) { builder.setKeyId(keyId); } diff --git a/getting-started/sms/respond-to-incoming-message/server/src/main/java/com/mycompany/app/sms/ServerBusinessLogic.java b/getting-started/sms/respond-to-incoming-message/server/src/main/java/com/mycompany/app/sms/ServerBusinessLogic.java index a0e09e7..6ffecca 100644 --- a/getting-started/sms/respond-to-incoming-message/server/src/main/java/com/mycompany/app/sms/ServerBusinessLogic.java +++ b/getting-started/sms/respond-to-incoming-message/server/src/main/java/com/mycompany/app/sms/ServerBusinessLogic.java @@ -4,7 +4,6 @@ import com.sinch.sdk.domains.sms.BatchesService; import com.sinch.sdk.domains.sms.models.InboundText; import com.sinch.sdk.domains.sms.models.requests.SendSmsBatchTextRequest; -import com.sinch.sdk.domains.sms.models.webhooks.WebhooksEvent; import java.util.Collections; import java.util.logging.Logger; import org.springframework.stereotype.Component; @@ -21,10 +20,11 @@ public ServerBusinessLogic(SinchClient sinchClient) { private static final Logger LOGGER = Logger.getLogger(ServerBusinessLogic.class.getName()); public void processInboundEvent(InboundText event) { - + LOGGER.info("Handle event: " + event); - SendSmsBatchTextRequest smsRequest = SendSmsBatchTextRequest.builder() + SendSmsBatchTextRequest smsRequest = + SendSmsBatchTextRequest.builder() .setTo(Collections.singletonList(event.getFrom())) .setBody("You sent: " + event.getBody()) .setFrom(event.getTo()) @@ -34,5 +34,4 @@ public void processInboundEvent(InboundText event) { batches.send(smsRequest); } - } diff --git a/getting-started/sms/respond-to-incoming-message/server/src/main/resources/application.yaml b/getting-started/sms/respond-to-incoming-message/server/src/main/resources/application.yaml index 7fb1e2b..6433f49 100644 --- a/getting-started/sms/respond-to-incoming-message/server/src/main/resources/application.yaml +++ b/getting-started/sms/respond-to-incoming-message/server/src/main/resources/application.yaml @@ -18,4 +18,4 @@ credentials: sms: # Sets the region for SMS # valid values are US and EU - region: \ No newline at end of file + region: