Updating status of received messages to RECEIVED
This commit is contained in:
parent
b6167ce166
commit
7d7dd02ceb
@ -25,8 +25,12 @@ public class ReceivedMessageProcessor implements Consumer<Message> {
|
||||
public void accept(Message message) {
|
||||
logger.info("Received message object " + message);
|
||||
if (message.getStatus() != MessageStatus.SENT) logger.warning("The message has the unexpected status " + message.getStatus());
|
||||
else
|
||||
else {
|
||||
// Update status to RECEIVED
|
||||
message.nextStatus();
|
||||
|
||||
// Dispatch event
|
||||
EventBus.getInstance().dispatch(new MessageCreationEvent(message));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user