From 7b14081c63b0ce7a349d5c6009623af7ef81938c Mon Sep 17 00:00:00 2001 From: Christian Basler Date: Fri, 28 Oct 2016 07:52:05 +0200 Subject: [PATCH] Set 'send time' on outgoing messages --- core/src/main/java/ch/dissem/bitmessage/entity/Plaintext.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/main/java/ch/dissem/bitmessage/entity/Plaintext.java b/core/src/main/java/ch/dissem/bitmessage/entity/Plaintext.java index 6a6ac16..710e041 100644 --- a/core/src/main/java/ch/dissem/bitmessage/entity/Plaintext.java +++ b/core/src/main/java/ch/dissem/bitmessage/entity/Plaintext.java @@ -264,6 +264,9 @@ public class Plaintext implements Streamable { } public void setStatus(Status status) { + if (status != Status.RECEIVED && sent == null && status != Status.DRAFT) { + sent = UnixTime.now(); + } this.status = status; }