Skip to content

feat: 알림 메시지 외부화 및 환경별 PushGateway 분리#133

Merged
soonduck-dreams merged 3 commits into
developfrom
feat/noti-message-yml
Aug 15, 2025
Merged

feat: 알림 메시지 외부화 및 환경별 PushGateway 분리#133
soonduck-dreams merged 3 commits into
developfrom
feat/noti-message-yml

Conversation

@soonduck-dreams

Copy link
Copy Markdown
Contributor

📝 요약(Summary)

이번 PR에서는 알림 메시지를 코드에서 떼어내서 설정 파일(YAML)로 관리하게 바꿨고,
환경마다 PushGateway가 다르게 동작하도록 분리했어요.


1. 알림 메시지 외부화

  • config/notification-messages.yml 파일 추가
  • NotificationMessagesConfig 클래스로 메시지를 불러오고, ActionNotificationRenderer에서 템플릿 기반으로 메시지 만드는 구조로 변경했어요.
  • 이제 {actorName}, {comment} 같은 변수를 치환해서 메시지를 만들 수 있어요.
# config/notification-messages.yml
notification-messages:
  types:
    LIKED_ON_COLLECTION:
      push-title: "{actorName}"
      push-body: "나의 새록을 좋아해요."
      in-app-body: "{actorName}님이 나의 새록을 좋아해요."
    COMMENTED_ON_COLLECTION:
      push-title: "{actorName}"
      push-body: "나의 새록에 댓글을 남겼어요. \"{comment}\""
      in-app-body: "{actorName}님이 나의 새록에 댓글을 남겼어요. \"{comment}\""
    SUGGESTED_BIRD_ID_ON_COLLECTION:
      push-title: "동정 의견 공유"
      push-body: "두근두근! 새로운 의견이 공유되었어요. 확인해볼까요?"
      in-app-body: "두근두근! 새로운 의견이 공유되었어요. 확인해볼까요?"

2. 환경별 PushGateway 분리

  • dev/prodFcmPushGateway (실제로 푸시 전송)
  • localLocalPushGateway (푸시 대신 콘솔에 모의 전송 로그 출력)
image

기대 효과

  • 알림 문구 바꿀 때 코드 안 건드리고 YAML만 수정하면 돼요.
  • 환경별로 푸시 동작을 분리해서 로컬에서 마음 놓고 테스트할 수 있어요.

✅ PR Checklist

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • [v] PR 제목을 커밋 메시지 컨벤션에 맞게 작성했습니다.

@soonduck-dreams soonduck-dreams merged commit dba7938 into develop Aug 15, 2025
1 check passed
@soonduck-dreams soonduck-dreams deleted the feat/noti-message-yml branch August 15, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant