Remove message and event processors from client
This commit is contained in:
@ -5,10 +5,11 @@ import java.nio.channels.*;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.*;
|
||||
|
||||
import envoy.client.event.EnvoyCloseEvent;
|
||||
import envoy.data.*;
|
||||
import envoy.data.Message.MessageStatus;
|
||||
import envoy.event.*;
|
||||
import envoy.exception.EnvoyException;
|
||||
import envoy.util.*;
|
||||
@ -45,6 +46,8 @@ public final class LocalDB implements EventListener {
|
||||
|
||||
private final File dbDir, idGeneratorFile, lastLoginFile, usersFile;
|
||||
|
||||
private static final Logger logger = EnvoyLog.getLogger(LocalDB.class);
|
||||
|
||||
/**
|
||||
* Constructs an empty local database.
|
||||
*
|
||||
@ -219,6 +222,22 @@ public final class LocalDB implements EventListener {
|
||||
}
|
||||
}
|
||||
|
||||
@Event(priority = 150)
|
||||
private void onMessage(Message msg) { if (msg.getStatus() == MessageStatus.SENT) msg.nextStatus(); }
|
||||
|
||||
@Event(priority = 150)
|
||||
private void onGroupMessage(GroupMessage msg) {
|
||||
// TODO: Cancel event once EventBus is updated
|
||||
if (msg.getStatus() == MessageStatus.WAITING || msg.getStatus() == MessageStatus.READ)
|
||||
logger.warning("The groupMessage has the unexpected status " + msg.getStatus());
|
||||
}
|
||||
|
||||
@Event(priority = 150, includeSubtypes = true)
|
||||
private void onMessageStatusChange(MessageStatusChange evt) {
|
||||
// TODO: Cancel event once EventBus is updated
|
||||
if (evt.get().ordinal() < MessageStatus.RECEIVED.ordinal()) logger.warning("Received invalid " + evt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores a new authentication token.
|
||||
*
|
||||
|
Reference in New Issue
Block a user