From fd1110e98661313af26379eade277e353688c769 Mon Sep 17 00:00:00 2001 From: Rinjae Date: Wed, 5 Nov 2025 13:16:21 +0900 Subject: [PATCH] =?UTF-8?q?ums=20=EC=97=B0=EB=8F=99=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/eactive/ext/kjb/ums/KjbUmsService.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java b/src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java index 0f321b1..659e73b 100644 --- a/src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java +++ b/src/main/java/com/eactive/ext/kjb/ums/KjbUmsService.java @@ -35,6 +35,8 @@ import java.util.function.BiConsumer; @Slf4j public class KjbUmsService { + public final static int[] ALLOW_CHANNELS = { MessageCode.Channels.KAKAO_ALIMTALK.getValue() }; + private final static String SEND_URL = "/ums/openapi/send"; private final static String CONTENT_TYPE = "application/json; charset=utf-8"; private final static String AUTHORIZATION_FMT = "Bearer %s"; @@ -69,6 +71,17 @@ public class KjbUmsService { this.property = property; } + + public static boolean isAllowChannel(MessageRequest message) { + for (int channel : ALLOW_CHANNELS) { + if ((message.getMessageCode().getChannels() & channel) == channel) { + return true; + } + } + return false; + } + + public boolean send(MessageRequest messageRequest) { if (messageRequest == null) { throw new IllegalArgumentException("messageRequest is null");