File tree Expand file tree Collapse file tree
src/main/java/org/devkor/apu/saerok_server/domain/notification/application/facade Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 - name : Grant execute permission for Gradle
2323 run : chmod +x gradlew
2424
25+ - name : Fix Docker API compatibility for Testcontainers
26+ run : echo 'api.version=1.44' > ~/.docker-java.properties
27+
2528 - name : Build with Gradle
2629 run : ./gradlew test bootJar
2730
Original file line number Diff line number Diff line change 2222 - name : Grant execute permission for Gradle
2323 run : chmod +x gradlew
2424
25+ - name : Fix Docker API compatibility for Testcontainers
26+ run : echo 'api.version=1.44' > ~/.docker-java.properties
27+
2528 - name : Build with Gradle
2629 run : ./gradlew test bootJar
2730
Original file line number Diff line number Diff line change 2222 - name : Grant execute permission for Gradle
2323 run : chmod +x gradlew
2424
25+ - name : Fix Docker API compatibility for Testcontainers
26+ run : echo 'api.version=1.44' > ~/.docker-java.properties
27+
2528 - name : Run tests
2629 run : ./gradlew test
Original file line number Diff line number Diff line change 44import org .devkor .apu .saerok_server .domain .notification .application .model .dsl .ActionKind ;
55import org .devkor .apu .saerok_server .domain .notification .application .model .dsl .Actor ;
66import org .devkor .apu .saerok_server .domain .notification .application .model .dsl .Target ;
7+ import org .devkor .apu .saerok_server .domain .notification .application .model .dsl .TargetType ;
78import org .devkor .apu .saerok_server .domain .notification .application .model .payload .ActionNotificationPayload ;
89import org .devkor .apu .saerok_server .domain .notification .application .port .TargetMetadataPort ;
910import org .devkor .apu .saerok_server .domain .notification .core .entity .NotificationAction ;
@@ -111,14 +112,18 @@ public void to(Long recipientId) {
111112 case SUGGEST_BIRD_ID -> NotificationAction .SUGGEST_BIRD_ID ;
112113 };
113114
115+ Long relatedId = target .type () == TargetType .COMMENT && extras .containsKey ("collectionId" )
116+ ? (Long ) extras .get ("collectionId" )
117+ : target .id ();
118+
114119 publisher .push (
115120 new ActionNotificationPayload (
116121 recipientId ,
117122 actor .id (),
118123 actor .name (),
119124 notificationSubject ,
120125 notificationAction ,
121- target . id () ,
126+ relatedId ,
122127 extras
123128 )
124129 );
You can’t perform that action at this time.
0 commit comments