Some bugfixes and added findMessages by sender
This commit is contained in:
parent
7fb837645f
commit
c3fdee79ca
@ -34,6 +34,8 @@ public interface MessageRepository {
|
||||
|
||||
List<Plaintext> findMessages(Status status, BitmessageAddress recipient);
|
||||
|
||||
List<Plaintext> findMessages(BitmessageAddress sender);
|
||||
|
||||
void save(Plaintext message);
|
||||
|
||||
void remove(Plaintext message);
|
||||
|
@ -221,7 +221,8 @@ public class DefaultNetworkHandler implements NetworkHandler, ContextHolder {
|
||||
i++;
|
||||
}
|
||||
return new Property("network", null,
|
||||
new Property("connectionManager", connectionManager.isAlive() ? "running" : "stopped"),
|
||||
new Property("connectionManager",
|
||||
connectionManager != null && connectionManager.isAlive() ? "running" : "stopped"),
|
||||
new Property("connections", null, streamProperties)
|
||||
);
|
||||
}
|
||||
|
@ -101,6 +101,11 @@ public class JdbcMessageRepository extends JdbcHelper implements MessageReposito
|
||||
return find("status='" + status.name() + "'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Plaintext> findMessages(BitmessageAddress sender) {
|
||||
return find("sender='" + sender.getAddress() + "'");
|
||||
}
|
||||
|
||||
private List<Plaintext> find(String where) {
|
||||
List<Plaintext> result = new LinkedList<>();
|
||||
try (Connection connection = config.getConnection()) {
|
||||
|
@ -2,9 +2,9 @@ uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
pom.project {
|
||||
name 'Jabit Spongy Security'
|
||||
artifactId = 'jabit-security-spongy'
|
||||
description 'The Security implementation using spongy castle (needed for Android)'
|
||||
name 'Jabit Bouncy Security'
|
||||
artifactId = 'jabit-security-bouncy'
|
||||
description 'The Security implementation using bouncy castle'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user