projects
/
demos
/
kafka
/
chat
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f36c65e
)
WIP:refactor
author
Kai Moritz
<kai@juplo.de>
Wed, 25 Jan 2023 16:49:28 +0000
(17:49 +0100)
committer
Kai Moritz
<kai@juplo.de>
Wed, 25 Jan 2023 16:49:28 +0000
(17:49 +0100)
src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoom.java
patch
|
blob
|
history
diff --git
a/src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoom.java
b/src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoom.java
index
a42434b
..
9ae967b
100644
(file)
--- a/
src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoom.java
+++ b/
src/main/java/de/juplo/kafka/chat/backend/domain/ChatRoom.java
@@
-69,9
+69,7
@@
public class ChatRoom
.getMessage(key)
.flatMap(existing -> text.equals(existing.getMessageText())
? Mono.just(existing)
- : Mono.error(() -> new MessageMutationException(existing, text)))
- .onErrorReturn(
- service
+ : service
.persistMessage(key, LocalDateTime.now(clock), text)
.doOnNext(m ->
{
@@
-80,7
+78,7
@@
public class ChatRoom
{
log.warn("Emitting of message failed with {} for {}", result.name(), m);
}
- })
.block()
);
+ }));
}