Skip to content

Commit 7d0594a

Browse files
Direct Message problem fixed
1 parent 7e6f60e commit 7d0594a

File tree

6 files changed

+91
-217
lines changed

6 files changed

+91
-217
lines changed

src/main/java/org/spacehub/entities/DirectMessaging/Message.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import jakarta.persistence.*;
44
import lombok.*;
5-
65
import java.util.UUID;
76

87
@Entity
@@ -64,11 +63,7 @@ public class Message {
6463

6564
@PrePersist
6665
public void prePersist() {
67-
if (this.messageUuid == null) {
68-
this.messageUuid = UUID.randomUUID().toString();
69-
}
70-
if (this.timestamp == null) {
71-
this.timestamp = java.time.Instant.now().toEpochMilli();
72-
}
66+
if (this.messageUuid == null) this.messageUuid = UUID.randomUUID().toString();
67+
if (this.timestamp == null) this.timestamp = java.time.Instant.now().toEpochMilli();
7368
}
7469
}

0 commit comments

Comments
 (0)