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(Status status, BitmessageAddress recipient);
|
||||||
|
|
||||||
|
List<Plaintext> findMessages(BitmessageAddress sender);
|
||||||
|
|
||||||
void save(Plaintext message);
|
void save(Plaintext message);
|
||||||
|
|
||||||
void remove(Plaintext message);
|
void remove(Plaintext message);
|
||||||
|
@ -221,7 +221,8 @@ public class DefaultNetworkHandler implements NetworkHandler, ContextHolder {
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
return new Property("network", null,
|
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)
|
new Property("connections", null, streamProperties)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -101,6 +101,11 @@ public class JdbcMessageRepository extends JdbcHelper implements MessageReposito
|
|||||||
return find("status='" + status.name() + "'");
|
return find("status='" + status.name() + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Plaintext> findMessages(BitmessageAddress sender) {
|
||||||
|
return find("sender='" + sender.getAddress() + "'");
|
||||||
|
}
|
||||||
|
|
||||||
private List<Plaintext> find(String where) {
|
private List<Plaintext> find(String where) {
|
||||||
List<Plaintext> result = new LinkedList<>();
|
List<Plaintext> result = new LinkedList<>();
|
||||||
try (Connection connection = config.getConnection()) {
|
try (Connection connection = config.getConnection()) {
|
||||||
|
@ -2,9 +2,9 @@ uploadArchives {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenDeployer {
|
mavenDeployer {
|
||||||
pom.project {
|
pom.project {
|
||||||
name 'Jabit Spongy Security'
|
name 'Jabit Bouncy Security'
|
||||||
artifactId = 'jabit-security-spongy'
|
artifactId = 'jabit-security-bouncy'
|
||||||
description 'The Security implementation using spongy castle (needed for Android)'
|
description 'The Security implementation using bouncy castle'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user