Distributable JAR build
- connection manager should now be rock stable - does try to create new connections as long as there are less than eight active connections, which might result in more than eight outgoing connections, but this shouldn't be a problem - some minor improvements and bug fixes
This commit is contained in:
@ -21,6 +21,7 @@ import ch.dissem.bitmessage.entity.ObjectMessage;
|
||||
import ch.dissem.bitmessage.entity.Plaintext;
|
||||
import ch.dissem.bitmessage.entity.payload.*;
|
||||
import ch.dissem.bitmessage.entity.payload.Pubkey.Feature;
|
||||
import ch.dissem.bitmessage.entity.valueobject.Label;
|
||||
import ch.dissem.bitmessage.entity.valueobject.PrivateKey;
|
||||
import ch.dissem.bitmessage.exception.DecryptionFailedException;
|
||||
import ch.dissem.bitmessage.factory.Factory;
|
||||
@ -114,6 +115,7 @@ public class BitmessageContext {
|
||||
0
|
||||
);
|
||||
msg.setStatus(SENT);
|
||||
msg.addLabels(ctx.getMessageRepository().getLabels(Label.Type.BROADCAST, Label.Type.SENT));
|
||||
ctx.getMessageRepository().save(msg);
|
||||
}
|
||||
|
||||
@ -148,6 +150,7 @@ public class BitmessageContext {
|
||||
ctx.getExtraBytes(to)
|
||||
);
|
||||
msg.setStatus(SENT);
|
||||
msg.addLabels(ctx.getMessageRepository().getLabels(Label.Type.SENT));
|
||||
ctx.getMessageRepository().save(msg);
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ class DefaultMessageListener implements NetworkHandler.MessageListener {
|
||||
LOG.warn("Broadcast with IV " + object.getInventoryVector() + " was successfully decrypted, but signature check failed. Ignoring.");
|
||||
} else {
|
||||
broadcast.getPlaintext().setStatus(RECEIVED);
|
||||
broadcast.getPlaintext().addLabels(ctx.getMessageRepository().getLabels(Label.Type.INBOX, Label.Type.UNREAD));
|
||||
broadcast.getPlaintext().addLabels(ctx.getMessageRepository().getLabels(Label.Type.INBOX, Label.Type.BROADCAST, Label.Type.UNREAD));
|
||||
broadcast.getPlaintext().setInventoryVector(object.getInventoryVector());
|
||||
ctx.getMessageRepository().save(broadcast.getPlaintext());
|
||||
listener.receive(broadcast.getPlaintext());
|
||||
|
@ -73,7 +73,8 @@ public class Label {
|
||||
|
||||
public enum Type {
|
||||
INBOX,
|
||||
DRAFTS,
|
||||
BROADCAST,
|
||||
DRAFT,
|
||||
SENT,
|
||||
UNREAD,
|
||||
TRASH
|
||||
|
Reference in New Issue
Block a user