通知機能にFCMオプション項目を追加#20
Closed
kantacky wants to merge 8 commits into
Closed
Conversation
ImageURL/AnalyticsLabel/APNs(Badge/Sound/ContentAvailable)/Android(ChannelID/Priority/TTLSeconds)/WebpushLinkをドメインとGORMモデルに追加し、FCM送信で扱える追加設定を保持できるようにした。 あわせて本文フィールドをMessageからBodyへ改称し、FCM SDKのNotification.Body命名と揃えた。APIスキーマは後続対応のため変更せず、ハンドラのコンバータ側でBodyとMessageのマッピングを維持している。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ドメインに追加したFCMオプション群(ImageURL/AnalyticsLabel/APNs/Android/Webpush)を、MulticastMessageのNotification.ImageURL・FCMOptions・APNSConfig・AndroidConfig・WebpushConfigへそれぞれ設定するようにした。 各プラットフォーム設定は該当フィールドが全てnilのときは付与せず、部分指定でもそのまま送信できるようbuildAndroidConfig/buildAPNSConfig/buildWebpushConfigで組み立てを局所化している。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…/notification-fcm-options
Notification のドメインモデルとAPI型に追加されていた ImageURL / AnalyticsLabel / APNs・Android の配信オプション / WebpushLink などのフィールドが、Converter で取りこぼされていた。 toAPINotification と toDomainNotification の双方で これらのフィールドを相互に変換するようにし、 APNsBadge と AndroidTTLSeconds については ドメイン側の int とAPI側の int32 の差異を明示的に変換する。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
通知機能にFCMの詳細オプションを追加し、プラットフォーム別のメッセージ制御を可能にしました。OpenAPIスキーマ更新に伴う再生成と、ドメイン・リポジトリ・ディスパッチ層への反映、Converterでのマッピング拡張までを含みます。
変更点
internal/domain/notification.go) を拡張し、以下のFCMオプション項目を追加しました。Body(旧Messageから改称)、ImageURL、AnalyticsLabelAPNsBadge、APNsSound、APNsContentAvailableAndroidChannelID、AndroidPriority、AndroidTTLSecondsWebpushLinkinternal/service/notification_dispatch.go) で、MulticastMessageにAndroid/APNS/Webpush/FCMOptionsを構築してセットするようにしました。各設定は該当項目が指定されているときのみ生成します。internal/database/notification.go) を新しいフィールドの読み書きに対応させました。internal/handler/converter.go) でリクエスト/レスポンス双方のFCMオプション項目をマッピングし、intとint32の変換を含めて整合させました。openapi/openapi.yaml) と生成コード (generated/api.gen.go) を dotto-typespec の更新に合わせて再生成しました。確認内容
go build ./...が通ること