diff --git a/src/main/java/com/chat/yourway/controller/TypingController.java b/src/main/java/com/chat/yourway/controller/TypingController.java index fbb846f7..abcfd8b7 100644 --- a/src/main/java/com/chat/yourway/controller/TypingController.java +++ b/src/main/java/com/chat/yourway/controller/TypingController.java @@ -14,8 +14,8 @@ public class TypingController { private final ChatTypingEventService chatTypingEventService; @MessageMapping("/typing/{isTyping}") - public void getTypingEvent(@DestinationVariable boolean isTyping, Principal principal) { + public void updateTypingEvent(@DestinationVariable boolean isTyping, Principal principal) { String email = principal.getName(); - chatTypingEventService.getTypingEvent(isTyping, email); + chatTypingEventService.updateTypingEvent(isTyping, email); } } diff --git a/src/main/java/com/chat/yourway/service/ChatTypingEventServiceImpl.java b/src/main/java/com/chat/yourway/service/ChatTypingEventServiceImpl.java index 20eed85c..0270aa8c 100644 --- a/src/main/java/com/chat/yourway/service/ChatTypingEventServiceImpl.java +++ b/src/main/java/com/chat/yourway/service/ChatTypingEventServiceImpl.java @@ -17,8 +17,8 @@ public class ChatTypingEventServiceImpl implements ChatTypingEventService { private final ChatNotificationService chatNotificationService; @Override - public void getTypingEvent(Boolean isTyping, String email) { - log.info("Start getTypingEvent isTyping={}, email={}", isTyping, email); + public void updateTypingEvent(Boolean isTyping, String email) { + log.info("Start updateTypingEvent isTyping={}, email={}", isTyping, email); contactEventService.updateTypingEvent(email, isTyping); Integer topicId = contactEventService.getAllByEmail(email).stream() diff --git a/src/main/java/com/chat/yourway/service/interfaces/ChatTypingEventService.java b/src/main/java/com/chat/yourway/service/interfaces/ChatTypingEventService.java index dd3fbff3..66e84118 100644 --- a/src/main/java/com/chat/yourway/service/interfaces/ChatTypingEventService.java +++ b/src/main/java/com/chat/yourway/service/interfaces/ChatTypingEventService.java @@ -3,11 +3,11 @@ public interface ChatTypingEventService { /** - * Get typing event by user email. + * Update typing event by user email. * * @param isTyping typing status. * @param email user email. */ - void getTypingEvent(Boolean isTyping, String email); + void updateTypingEvent(Boolean isTyping, String email); }