-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Breaking Changes
API 변경사항
신규 API 추가 (Breaking 없음):
PATCH /api/v2/notifications/{notificationId}/read- 알림 읽음 처리 API
- 기존 API 영향 없음
FCM data payload 구조 변경:
Before:
{
"title": "알림 제목",
"body": "알림 내용"
}After:
{
"title": "알림 제목",
"body": "알림 내용",
"data": {
"notificationId": "123",
"notificationType": "COMMENT",
"metadata": "{\"diaryId\": 456, \"commentId\": 789}"
}
}프론트엔드 대응 필요:
- FCM data payload에서
metadata파싱 notificationType기반으로 라우팅 처리- 알림 탭 시
notificationId로 읽음 처리 API 호출
예시 (Flutter):
void handleNotificationClick(RemoteMessage message) {
final data = message.data;
final notificationId = data['notificationId'];
final notificationType = data['notificationType'];
final metadata = jsonDecode(data['metadata']);
// 읽음 처리
await notificationApi.markAsRead(notificationId);
// 라우팅 처리
switch (notificationType) {
case 'COMMENT':
context.go('/diaries/${metadata['diaryId']}#comment-${metadata['commentId']}');
break;
case 'LIKE':
context.go('/diaries/${metadata['diaryId']}');
break;
// ...
}
}Reactions are currently unavailable